Conditions | 3 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 10 |
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 | $data = []; |
||
|
|||
40 | $todayGames = $nfl->getTodayGames(); |
||
41 | |||
42 | if (is_null($todayGames)) { |
||
43 | exit($this->line('Sorry, there is no games scheduled for today.')); |
||
44 | } |
||
45 | |||
46 | $printer = new Printer($this); |
||
47 | |||
48 | $printer->renderGamesList($todayGames); |
||
49 | } catch (ErrorException $e) { |
||
50 | exit($this->line('Sorry, there was a problem fetching the remote data.')); |
||
51 | } |
||
54 |