Repository/Yaml/RepoRepository.php
public function findBySlug($slug)
    {
        foreach ($this->findAll() as $repo) {
            if ($slug == $repo->getSlug()) {
                return $repo;
            }
        }

        return null;
    }
public function findBySlug($slug)
    {
        foreach ($this->findAll() as $repo) {
            if ($slug == $repo->getSlug()) {
                return $repo;
            }
        }

        return null;
    }
public function findBySlug ( $ slug ) { foreach ( $ this -> findAll ( ) as $ repo ) { if ( $ slug == $ repo -> getSlug ( ) ) { return $ repo ; } } return null ; }
Find repo by Slug

@param string $slug Repo Slug
@return Repo|null
Find repo by Slug