src/main/php/response/Error.php
public static function methodNotAllowed(string $requestMethod, array $allowedMethods): self
    {
        return new self(
                'The given request method '
                . strtoupper($requestMethod)
                . ' is not valid. Please use one of '
                . join(', ', $allowedMethods) . '.',
                'Method Not Allowed'
        );
    }
public static function methodNotAllowed(string $requestMethod, array $allowedMethods): self
    {
        return new self(
                'The given request method '
                . strtoupper($requestMethod)
                . ' is not valid. Please use one of '
                . join(', ', $allowedMethods) . '.',
                'Method Not Allowed'
        );
    }
public static function methodNotAllowed ( string $ requestMethod , array $ allowedMethods ) : self { return new self ( 'The given request method ' . strtoupper ( $ requestMethod ) . ' is not valid. Please use one of ' . join ( ', ' , $ allowedMethods ) . '.' , 'Method Not Allowed' ) ; }
creates error when access to resource with request method is not allowed

@param   string    $requestMethod   actual request method
@param   string[]  $allowedMethods  list of allowed request methods
@return  \stubbles\webapp\response\Error
creates error when access to resource with request method is not allowed