/**
  * @return stdClass[]
  */
 public function currentUserModules()
 {
     /* @var RepositoryCollection $repositoryCollection */
     $repositoryCollection = $this->githubClient->api('current_user')->repos(['type' => 'all', 'per_page' => 100]);
     return array_filter(iterator_to_array($repositoryCollection), function ($repository) {
         if (true === $repository->fork) {
             return false;
         }
         if (false === $repository->permissions->push) {
             return false;
         }
         if (!$this->moduleMapper->findByUrl($repository->html_url)) {
             return false;
         }
         return true;
     });
 }
 /**
  * Return all Repositories from current authenticated GitHub User
  *
  * @param array $params
  *
  * @return RepositoryCollection
  */
 public function getAuthenticatedUserRepositories($params = [])
 {
     return $this->githubClient->api('current_user')->repos($params);
 }
 /**
  * @return string
  */
 public function __invoke()
 {
     $orgs = $this->githubClient->api('current_user')->orgs();
     return $this->getView()->render('user/helper/user-organizations.phtml', ['orgs' => $orgs]);
 }