src/OAuth2/Scope.php
public function scopeExists($scope)
    {
        // Check reserved scopes first.
        $scope = explode(' ', trim($scope));
        $reservedScope = $this->getReservedScopes();
        $nonReservedScopes = array_diff($scope, $reservedScope);
        if (count($nonReservedScopes) == 0) {
            return true;
        } else {
            // Check the storage for non-reserved scopes.
            $nonReservedScopes = implode(' ', $nonReservedScopes);

            return $this->storage->scopeExists($nonReservedScopes);
        }
    }
public function scopeExists($scope)
    {
        // Check reserved scopes first.
        $scope = explode(' ', trim($scope));
        $reservedScope = $this->getReservedScopes();
        $nonReservedScopes = array_diff($scope, $reservedScope);
        if (count($nonReservedScopes) == 0) {
            return true;
        } else {
            // Check the storage for non-reserved scopes.
            $nonReservedScopes = implode(' ', $nonReservedScopes);

            return $this->storage->scopeExists($nonReservedScopes);
        }
    }
public function scopeExists ( $ scope ) { // Check reserved scopes first. $ scope = explode ( ' ' , trim ( $ scope ) ) ; $ reservedScope = $ this -> getReservedScopes ( ) ; $ nonReservedScopes = array_diff ( $ scope , $ reservedScope ) ; if ( count ( $ nonReservedScopes ) == 0 ) { return true ; } else { // Check the storage for non-reserved scopes. $ nonReservedScopes = implode ( ' ' , $ nonReservedScopes ) ; return $ this -> storage -> scopeExists ( $ nonReservedScopes ) ; } }
Check if the provided scope exists in storage.

@param string $scope - A space-separated string of scopes.
@return bool         - TRUE if it exists, FALSE otherwise.
Check if the provided scope exists in storage .