Completed
Branch develop (f86c92)
by Max
05:48
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 ($app) {
18
+        $this->app->bind(NFL::class, function($app) {
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
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getFinishedGames(): ?GenericList
51 51
     {
52
-        return $this->getTodayGames()->filter(function ($key, $game) {
53
-            return in_array($game->score['phase'], ['FINAL', 'FINAL OVERTIME']);
52
+        return $this->getTodayGames()->filter(function($key, $game) {
53
+            return in_array($game->score[ 'phase' ], [ 'FINAL', 'FINAL OVERTIME' ]);
54 54
         });
55 55
     }
56 56
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getFinishedGameByTeam(string $team): ?GenericList
67 67
     {
68
-        return $this->getFinishedGames()->filter(function ($key, $game) use ($team) {
69
-            return $game->gameSchedule['homeTeamAbbr'] === $team ||
70
-                $game->gameSchedule['visitorTeamAbbr'] === $team;
68
+        return $this->getFinishedGames()->filter(function($key, $game) use ($team) {
69
+            return $game->gameSchedule[ 'homeTeamAbbr' ] === $team ||
70
+                $game->gameSchedule[ 'visitorTeamAbbr' ] === $team;
71 71
         });
72 72
     }
73 73
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getLiveGames(): ?GenericList
83 83
     {
84
-        return $this->getWeekGames()->filter(function ($key, $game) {
85
-            return !in_array($game->score['phase'], ['FINAL', 'SUSPENDED', 'FINAL OVERTIME', null]);
84
+        return $this->getWeekGames()->filter(function($key, $game) {
85
+            return !in_array($game->score[ 'phase' ], [ 'FINAL', 'SUSPENDED', 'FINAL OVERTIME', null ]);
86 86
         });
87 87
     }
88 88
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function getLiveGameByTeam(string $team): ?GenericList
99 99
     {
100
-        return $this->getLiveGames()->filter(function ($key, $game) use ($team) {
101
-            return $game->gameSchedule['homeTeamAbbr'] === $team ||
102
-                $game->gameSchedule['visitorTeamAbbr'] === $team;
100
+        return $this->getLiveGames()->filter(function($key, $game) use ($team) {
101
+            return $game->gameSchedule[ 'homeTeamAbbr' ] === $team ||
102
+                $game->gameSchedule[ 'visitorTeamAbbr' ] === $team;
103 103
         });
104 104
     }
105 105
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function getTodayGames(): ?GenericList
113 113
     {
114
-        return $this->getWeekGames()->filter(function ($key, $game) {
115
-            return str_replace('\/', '/', $game->gameSchedule['gameDate']) === $this->today->format('m/d/Y');
114
+        return $this->getWeekGames()->filter(function($key, $game) {
115
+            return str_replace('\/', '/', $game->gameSchedule[ 'gameDate' ]) === $this->today->format('m/d/Y');
116 116
         });
117 117
     }
118 118
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $data = $this->client->get();
133 133
         $parsedData = JSONParser::parse($data);
134 134
 
135
-        foreach ($parsedData['gameScores'] as $key => $gameData) {
135
+        foreach ($parsedData[ 'gameScores' ] as $key => $gameData) {
136 136
             $games->add(new Game($gameData));
137 137
         }
138 138
 
Please login to merge, or discard this patch.