/**
  * @return string
  */
 public function __invoke()
 {
     if (null === $this->url) {
         $this->url = sprintf('https://github.com/%s/%s', $this->repository->owner(), $this->repository->name());
     }
     return $this->url;
 }
 public function indexAction()
 {
     $contributors = $this->repositoryRetriever->getContributors($this->repository->owner(), $this->repository->name());
     shuffle($contributors);
     $metadata = $this->repositoryRetriever->getUserRepositoryMetadata($this->repository->owner(), $this->repository->name());
     return new ViewModel(['contributors' => $contributors, 'metadata' => $metadata]);
 }
 public function testConstructorCastsToString()
 {
     $owner = new StringCastable('foo');
     $name = new StringCastable('bar');
     $entity = new Entity\Repository($owner, $name);
     $this->assertSame((string) $owner, $entity->owner());
     $this->assertSame((string) $name, $entity->name());
 }