protected function parseScopeArray(array $scopes)
    {
        $parsedScopes = [];

        foreach ($scopes as $scope) {
            if (is_string($scope) && $scope != '') {
                $parsedScopes[] = $scope;
            } else if ($scope instanceof IScope) {
                $parsedScopes[] =  $scope->getId();
            } else {
                throw new \InvalidArgumentException('Scopes has to be array of strings or OAuth2\Storage\IScope instances.');
            }
        }

        return $parsedScopes;
    }
protected function parseScopeArray(array $scopes)
    {
        $parsedScopes = [];

        foreach ($scopes as $scope) {
            if (is_string($scope) && $scope != '') {
                $parsedScopes[] = $scope;
            } else if ($scope instanceof IScope) {
                $parsedScopes[] =  $scope->getId();
            } else {
                throw new \InvalidArgumentException('Scopes has to be array of strings or OAuth2\Storage\IScope instances.');
            }
        }

        return $parsedScopes;
    }
protected function parseScopeArray ( array $ scopes ) { $ parsedScopes = [ ] ; foreach ( $ scopes as $ scope ) { if ( is_string ( $ scope ) && $ scope != '' ) { $ parsedScopes [ ] = $ scope ; } else if ( $ scope instanceof IScope ) { $ parsedScopes [ ] = $ scope -> getId ( ) ; } else { throw new \ InvalidArgumentException ( 'Scopes has to be array of strings or OAuth2\Storage\IScope instances.' ) ; } } return $ parsedScopes ; }
Parses scopes from array of scopes and returns array of scope identifiers

@param string[] $scopes
@return string[]
@throws \InvalidArgumentException
Parses scopes from array of scopes and returns array of scope identifiers