protected function isMethodAllowed($method) { if (!$method) { throw new InvalidArgument('Method cannot be empty.'); } if ($this->isAllMethodsAllowed()) { return true; } return in_array(strtoupper($method), $this->allowMethods); }