Knp\Bundle\KnpBundlesBundle\Git\Repo::getGitRepo PHP Method

getGitRepo() public method

Get gitRepo
public getGitRepo ( ) : PHPGit_Repository
return PHPGit_Repository
    public function getGitRepo()
    {
        return $this->gitRepo;
    }

Usage Example

示例#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;
 }
All Usage Examples Of Knp\Bundle\KnpBundlesBundle\Git\Repo::getGitRepo