private function getAccessToken(Provider $provider, $userId, $scope)
    {
        $accessTokenList = $this->tokenStorage->getAccessTokenList($userId);
        foreach ($accessTokenList as $accessToken) {
            if ($provider->getProviderId() !== $accessToken->getProviderId()) {
                continue;
            }
            if ($scope !== $accessToken->getScope()) {
                continue;
            }

            return $accessToken;
        }

        return false;
    }
private function getAccessToken(Provider $provider, $userId, $scope)
    {
        $accessTokenList = $this->tokenStorage->getAccessTokenList($userId);
        foreach ($accessTokenList as $accessToken) {
            if ($provider->getProviderId() !== $accessToken->getProviderId()) {
                continue;
            }
            if ($scope !== $accessToken->getScope()) {
                continue;
            }

            return $accessToken;
        }

        return false;
    }
private function getAccessToken ( Provider $ provider , $ userId , $ scope ) { $ accessTokenList = $ this -> tokenStorage -> getAccessTokenList ( $ userId ) ; foreach ( $ accessTokenList as $ accessToken ) { if ( $ provider -> getProviderId ( ) !== $ accessToken -> getProviderId ( ) ) { continue ; } if ( $ scope !== $ accessToken -> getScope ( ) ) { continue ; } return $ accessToken ; } return false ; }
Find an AccessToken in the list that matches this scope, bound to
providerId and userId.

@param Provider $provider
@param string   $userId
@param string   $scope

@return false|AccessToken
Find an AccessToken in the list that matches this scope bound to providerId and userId .