getGitRepo() public method

Get gitRepo
public getGitRepo ( ) : PHPGit_Repository
return PHPGit_Repository
Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function matches(Repo $repo)
 {
     $directory = $repo->getGitRepo()->getDir();
     $finder = new Finder();
     $finder->files()->name('*Kernel.php')->in($directory)->depth('< 3');
     $candidates = $finder->getIterator();
     foreach ($candidates as $candidate) {
         if (preg_match('/public function registerBundles/s', file_get_contents($candidate))) {
             return true;
         }
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function matches(Repo $repo)
 {
     $directory = $repo->getGitRepo()->getDir();
     $gitmodules = $directory . '/.gitmodules';
     return file_exists($gitmodules) && preg_match('/symfony/is', file_get_contents($gitmodules));
 }