Knp\Bundle\KnpBundlesBundle\Finder\Github::find PHP Method

find() public method

Finds the repositories
public find ( ) : array
return array
    public function find()
    {
        /** @var Repo $repositoryApi */
        $repositoryApi = $this->github->api('repo');
        $repositories = $this->fetchRepositoryApi($repositoryApi, $this->query);
        $forkedRepositories = $this->fetchRepositoryApi($repositoryApi, $this->forkedRepoQuery);
        return array_merge($repositories, $forkedRepositories);
    }

Usage Example

Beispiel #1
0
 /**
  * @dataProvider getExtractPageUrlsData
  * @test
  */
 public function shouldExtractPageUrlsFromGithubHtml($node, $expected)
 {
     $browser = $this->getBrowserMock($node, 'https://github.com/search?q=Symfony2&type=Repositories&language=PHP&start_value=3');
     $finder = new Github('Symfony2', 3);
     $finder->setBrowser($browser);
     $this->assertEquals($expected, $finder->find());
 }