Conditions | 4 |
Paths | 12 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.432 |
Changes | 0 |
1 | <?php |
||
29 | 3 | public function handle(): void |
|
30 | { |
||
31 | try { |
||
32 | 3 | $games = (!is_null($this->argument('team'))) |
|
33 | 1 | ? $this->NFL->getFinishedGameByTeam($this->argument('team')) |
|
|
|||
34 | 3 | : $this->NFL->getFinishedGames(); |
|
35 | |||
36 | 3 | if (is_null($games)) { |
|
37 | exit($this->line('Sorry, there is no finished games at this moment.')); |
||
38 | } |
||
39 | |||
40 | 3 | $printer = new Printer($this); |
|
41 | 3 | $printer->renderScoreBoard($games); |
|
42 | } catch (ErrorException $e) { |
||
43 | exit($this->line('Sorry, there was a problem fetching the remote data.')); |
||
44 | } |
||
47 |