src/CorsService.php
protected function isMethodAllowed($method)
    {
        // Make sure $method is string
        if (!is_string($method)) {
            throw new InvalidArgumentException(
                '$method must be string'
            );
        }

        // If method is simple method, always allow
        if ($this->isSimpleMethod($method)) {
            return true;
        }

        return in_array(
            $method,
            $this->config['allowMethods'],
            true
        );
    }
protected function isMethodAllowed($method)
    {
        // Make sure $method is string
        if (!is_string($method)) {
            throw new InvalidArgumentException(
                '$method must be string'
            );
        }

        // If method is simple method, always allow
        if ($this->isSimpleMethod($method)) {
            return true;
        }

        return in_array(
            $method,
            $this->config['allowMethods'],
            true
        );
    }
protected function isMethodAllowed ( $ method ) { // Make sure $method is string if ( ! is_string ( $ method ) ) { throw new InvalidArgumentException ( '$method must be string' ) ; } // If method is simple method, always allow if ( $ this -> isSimpleMethod ( $ method ) ) { return true ; } return in_array ( $ method , $ this -> config [ 'allowMethods' ] , true ) ; }
Check if request method is allowed

@param string $method
@return bool
@throws InvalidArgumentException
Check if request method is allowed