public function isProject(Project $project) { return $project->getSlug() == $this->slug; }
/** * Computes the repository path for a given project. */ protected function getPath(Project $project) { return $this->repositoryPath . '/' . $project->getSlug() . '.git'; }
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); } }