/** * @param GithubRepoDataInterface $githubRepo * @param GithubPullRequestDataInterface $githubPullRequest * @param User $user * * @return mixed */ public function fetch(GithubRepoDataInterface $githubRepo, GithubPullRequestDataInterface $githubPullRequest, User $user) { $client = $this->createClient($user); $remoteData = $client->api('repository')->pullRequestes($githubRepo->getOwner(), $githubRepo->getName(), $githubPullRequest->getName()); return $this->githubPullRequestDataFactory->create($remoteData); }