Conditions | 3 |
Paths | 8 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
34 | public function handle(): void |
||
35 | { |
||
36 | $nfl = new NFL(new NFLHttpClient(), new DateTime('now', new DateTimeZone('US/Eastern'))); |
||
37 | |||
38 | try { |
||
39 | $games = (!is_null($this->argument('team'))) |
||
40 | ? $nfl->getFinishedGameByTeam($this->argument('team')) |
||
|
|||
41 | : $nfl->getFinishedGames(); |
||
42 | |||
43 | $printer = new Printer($this); |
||
44 | $printer->renderScoreBoard($games); |
||
45 | } catch (ErrorException $e) { |
||
46 | exit($this->line('Sorry, there was a problem fetching the remote data.')); |
||
47 | } |
||
50 |