Esempio n. 1
0
 /**
  * @param Build $build
  * @return bool|AbstractProvider
  */
 public static function createForBuild(Build $build)
 {
     switch (strtolower($build->getProject()->getScm())) {
         case 'git':
             $git = new Git();
             if ($build->getForkUri()) {
                 $git->setRepository($build->getForkUri());
             } else {
                 $git->setRepository($build->getProject()->getUri());
             }
             return $git;
     }
     return false;
 }