| Conditions | 4 |
| Paths | 12 |
| Total Lines | 16 |
| 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 | 2 | ? $this->NFL->getLiveGameByTeam($this->argument('team')) |
|
|
|
|||
| 34 | 3 | : $this->NFL->getLiveGames(); |
|
| 35 | |||
| 36 | 3 | if (is_null($games)) { |
|
| 37 | exit($this->line('Sorry, there is no live games at this moment.')); |
||
| 38 | } |
||
| 39 | |||
| 40 | 3 | $printer = new Printer($this); |
|
| 41 | |||
| 42 | 3 | $printer->renderScoreBoard($games); |
|
| 43 | } catch (ErrorException $e) { |
||
| 44 | exit($this->line('Sorry, there was a problem fetching the remote data.')); |
||
| 45 | } |
||
| 48 |