src/Exception/OAuthServerException.php
public static function invalidScope($scope, $redirectUri = null)
    {
        $errorMessage = 'The requested scope is invalid, unknown, or malformed';

        if (empty($scope)) {
            $hint = 'Specify a scope in the request or set a default scope';
        } else {
            $hint = sprintf(
                'Check the `%s` scope',
                htmlspecialchars($scope, ENT_QUOTES, 'UTF-8', false)
            );
        }

        return new static($errorMessage, 5, 'invalid_scope', 400, $hint, $redirectUri);
    }
public static function invalidScope($scope, $redirectUri = null)
    {
        $errorMessage = 'The requested scope is invalid, unknown, or malformed';

        if (empty($scope)) {
            $hint = 'Specify a scope in the request or set a default scope';
        } else {
            $hint = sprintf(
                'Check the `%s` scope',
                htmlspecialchars($scope, ENT_QUOTES, 'UTF-8', false)
            );
        }

        return new static($errorMessage, 5, 'invalid_scope', 400, $hint, $redirectUri);
    }
public static function invalidScope ( $ scope , $ redirectUri = null ) { $ errorMessage = 'The requested scope is invalid, unknown, or malformed' ; if ( empty ( $ scope ) ) { $ hint = 'Specify a scope in the request or set a default scope' ; } else { $ hint = sprintf ( 'Check the `%s` scope' , htmlspecialchars ( $ scope , ENT_QUOTES , 'UTF-8' , false ) ) ; } return new static ( $ errorMessage , 5 , 'invalid_scope' , 400 , $ hint , $ redirectUri ) ; }
Invalid scope error.

@param string      $scope       The bad scope
@param null|string $redirectUri A HTTP URI to redirect the user back to

@return static
Invalid scope error .