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;
 }
Example #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));
 }
Example #3
0
 /**
  * {@inheritDoc}
  */
 public function matches(Repo $repo)
 {
     $name = $repo->getBundleEntity()->getName();
     return (bool) preg_match($this->pattern, $name);
 }