protected function isMethodAllowed(?string $method)
    {
        if ($this->isAllMethodsAllowed()) {
            return true;
        }

        return in_array(strtoupper($method), $this->allowMethods);
    }
protected function isMethodAllowed(?string $method)
    {
        if ($this->isAllMethodsAllowed()) {
            return true;
        }

        return in_array(strtoupper($method), $this->allowMethods);
    }
protected function isMethodAllowed ( ? string $ method ) { if ( $ this -> isAllMethodsAllowed ( ) ) { return true ; } return in_array ( strtoupper ( $ method ) , $ this -> allowMethods ) ; }
Returns whether or not the method is allowed.

@param string|null $method

@return bool
Returns whether or not the method is allowed .