public static function getAllResults(ClientInterface $client, $url)
    {
        $data = [];
        do {
            $response = $client->get($url);
            $data = array_merge($data, $response->json());

            $url = GithubApplication::parseLinkHeader($response)['next'];
        } while ($url);

        return $data;
    }
public static function getAllResults(ClientInterface $client, $url)
    {
        $data = [];
        do {
            $response = $client->get($url);
            $data = array_merge($data, $response->json());

            $url = GithubApplication::parseLinkHeader($response)['next'];
        } while ($url);

        return $data;
    }
public static function getAllResults ( ClientInterface $ client , $ url ) { $ data = [ ] ; do { $ response = $ client -> get ( $ url ) ; $ data = array_merge ( $ data , $ response -> json ( ) ) ; $ url = GithubApplication :: parseLinkHeader ( $ response ) [ 'next' ] ; } while ( $ url ) ; return $ data ; }
Helper function to retrieve all the "pages" of results from a GitHub API call
and returns them as a single array

@param  ClientInterface $client
@param  string $url
@return array
Helper function to retrieve all the pages of results from a GitHub API call and returns them as a single array