github: fix notices
[pharext/pharext.org] / app / Controller / Github / Index.php
1 <?php
2
3 namespace app\Controller\Github;
4
5 use app\Controller\Github;
6 use app\Github\API\Repos\ReposCallback;
7
8 class Index extends Github
9 {
10 function __invoke(array $args = null) {
11 if (!$this->checkToken()) {
12 return;
13 }
14 $this->github->listRepos(
15 $this->app->getRequest()->getQuery("page")
16 )->then(
17 new ReposCallback($this->github)
18 )->done(function($results) {
19 list(list($repos, $links)) = $results;
20 $this->app->display("github/index", compact("repos", "links"));
21 });
22
23 $this->github->drain();
24 }
25 }