src/Exception/HttpException.php
public static function methodNotAllowed($path, $method, array $allowed)
    {
        $error = new static(sprintf(
            'Cannot access resource `%s` using method `%s`',
            $path,
            $method
        ), 405);

        $error->allowed = $allowed;

        return $error;
    }
public static function methodNotAllowed($path, $method, array $allowed)
    {
        $error = new static(sprintf(
            'Cannot access resource `%s` using method `%s`',
            $path,
            $method
        ), 405);

        $error->allowed = $allowed;

        return $error;
    }
@param string $path
@param string $method
@param array $allowed

@return static