Exemplo n.º 1
0
 /**
  * @param GithubRepoData|GithubRepoDataInterface $remote
  * @param GithubRepo                             $entity
  *
  * @return bool
  */
 public function map(GithubRepoDataInterface $remote, GithubRepo $entity)
 {
     $entity->setGithubId($remote->getGithubId());
     $entity->setOwner($remote->getOwner());
     $entity->setName($remote->getName());
     $entity->setFullName($remote->getFullName());
     $entity->setHtmlUrl($remote->getHtmlUrl());
     $entity->setDescription($remote->getDescription());
     $entity->setFork($remote->getFork());
     $entity->setDefaultBranch($remote->getDefaultBranch());
     $entity->setGithubPrivate($remote->getGithubPrivate());
     $entity->setGitUrl($remote->getGitUrl());
     $entity->setSshUrl($remote->getSshUrl());
     $entity->setGithubCreatedAt($remote->getGithubCreatedAt());
     $entity->setGithubUpdatedAt($remote->getGithubUpdatedAt());
     $entity->setGithubPushedAt($remote->getGithubPushedAt());
     return true;
 }
Exemplo n.º 2
0
 /**
  * @param Repo|GithubRepoDataInterface $repoValueObject
  *
  * @return mixed
  */
 public function get(GithubRepoDataInterface $repoValueObject)
 {
     return $this->repository->findOneByFullName($repoValueObject->getFullName());
 }
Exemplo n.º 3
0
 /**
  * @param GithubRepoDataInterface $repo
  *
  * @return \Symfony\Component\Form\FormView
  */
 public function getNew(GithubRepoDataInterface $repo)
 {
     $form = clone $this->form;
     $form->get('projectName')->setData($repo->getFullName());
     return $form->createView();
 }