Completed
Push — master ( 3ec9c1...244937 )
by Max
02:44
created
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function register(): void
17 17
     {
18
-        $this->app->bind(NFL::class, function () {
18
+        $this->app->bind(NFL::class, function() {
19 19
             return new NFL(new NFLHttpClient(), new DateTime('now', new DateTimeZone('US/Eastern')));
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
app/Models/NFL.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
             return null;
56 56
         }
57 57
 
58
-        return $todayGames->filter(function ($key, $game) {
59
-            return in_array($game->score['phase'], ['FINAL', 'FINAL OVERTIME']);
58
+        return $todayGames->filter(function($key, $game) {
59
+            return in_array($game->score[ 'phase' ], [ 'FINAL', 'FINAL OVERTIME' ]);
60 60
         });
61 61
     }
62 62
 
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
             return null;
78 78
         }
79 79
 
80
-        return $finishedGames->filter(function ($key, $game) use ($team) {
81
-            return $game->gameSchedule['homeTeamAbbr'] === $team ||
82
-                $game->gameSchedule['visitorTeamAbbr'] === $team;
80
+        return $finishedGames->filter(function($key, $game) use ($team) {
81
+            return $game->gameSchedule[ 'homeTeamAbbr' ] === $team ||
82
+                $game->gameSchedule[ 'visitorTeamAbbr' ] === $team;
83 83
         });
84 84
     }
85 85
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
             return null;
100 100
         }
101 101
 
102
-        return $todayGames->filter(function ($key, $game) {
103
-            return !in_array($game->score['phase'], ['FINAL', 'SUSPENDED', 'FINAL OVERTIME', null]);
102
+        return $todayGames->filter(function($key, $game) {
103
+            return !in_array($game->score[ 'phase' ], [ 'FINAL', 'SUSPENDED', 'FINAL OVERTIME', null ]);
104 104
         });
105 105
     }
106 106
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
             return null;
122 122
         }
123 123
 
124
-        return $livegames->filter(function ($key, $game) use ($team) {
125
-            return $game->gameSchedule['homeTeamAbbr'] === $team ||
126
-                $game->gameSchedule['visitorTeamAbbr'] === $team;
124
+        return $livegames->filter(function($key, $game) use ($team) {
125
+            return $game->gameSchedule[ 'homeTeamAbbr' ] === $team ||
126
+                $game->gameSchedule[ 'visitorTeamAbbr' ] === $team;
127 127
         });
128 128
     }
129 129
 
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function getTodayGames(): ?GenericList
137 137
     {
138
-        return $this->getWeekGames()->filter(function ($key, $game) {
139
-            return str_replace('\/', '/', $game->gameSchedule['gameDate']) === $this->today->format('m/d/Y');
138
+        return $this->getWeekGames()->filter(function($key, $game) {
139
+            return str_replace('\/', '/', $game->gameSchedule[ 'gameDate' ]) === $this->today->format('m/d/Y');
140 140
         });
141 141
     }
142 142
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $data = $this->client->get();
157 157
         $parsedData = JSONParser::parse($data);
158 158
 
159
-        foreach ($parsedData['gameScores'] as $key => $gameData) {
159
+        foreach ($parsedData[ 'gameScores' ] as $key => $gameData) {
160 160
             $games->add(new Game($gameData));
161 161
         }
162 162
 
Please login to merge, or discard this patch.