function showMoreResults(AccessResponse $accessResponse) { $resultKey = getVariable('resultKey'); if (!$resultKey) { echo "Couldn't read resultKey, can't show more results."; return; } $storedLink = StoredLink::createFromKey($resultKey); if (!$storedLink) { echo "Couldn't find storedLink from key {$resultKey}, can't show more results."; return; } $api = new \AABTest\GithubAPI\GithubAPI(GITHUB_USER_AGENT); $command = $api->listRepoCommitsPaginate('token ' . $accessResponse->accessToken, $storedLink->link->url); $commits = $command->execute(); displayCommits($commits); $response = $command->getResponse(); displayAndSaveLinks($response); }