Example #1
0
 public function isProject(Project $project)
 {
     return $project->getSlug() == $this->slug;
 }
Example #2
0
 /**
  * Computes the repository path for a given project.
  */
 protected function getPath(Project $project)
 {
     return $this->repositoryPath . '/' . $project->getSlug() . '.git';
 }
Example #3
0
 public static function isSlugValid(Project $project, ExecutionContextInterface $context)
 {
     if (!preg_match('#^' . Project::SLUG_PATTERN . '$#', $project->getSlug())) {
         $context->addViolationAt('slug', 'This value is not valid.', array(), null);
     }
 }