GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( e5dc13...80da25 )
by Ash
05:57
created
src/APAnalytics.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $aggregate      = [];
66 66
         $model          = $this->namespace.Str::studly(Str::singular($collection)).'Analytic';
67 67
 
68
-        if (! class_exists($model)) {
68
+        if (!class_exists($model)) {
69 69
             throw new InvalidArgumentException("Model {$model} does not exist.");
70 70
         }
71 71
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             }
86 86
         }
87 87
 
88
-        if (! app()->runningInConsole()) {
88
+        if (!app()->runningInConsole()) {
89 89
             abort_unless(auth()->check() && auth()->user()->can('view', [(new $model), $matchArray]), 403, 'You dont have permission to view these analytics');
90 90
         }
91 91
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         }
103 103
 
104 104
         if ($distinct) {
105
-            $aggregate[] =  [
105
+            $aggregate[] = [
106 106
                 '$group' => [
107
-                    '_id'        => '$' . $distinct,
107
+                    '_id'        => '$'.$distinct,
108 108
                     'created_at' => [
109 109
                         '$last' => '$created_at',
110 110
                     ],
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 $intervalFormat = '%Y-%m';
126 126
             }
127 127
 
128
-            $aggregate[] =  [
128
+            $aggregate[] = [
129 129
                 '$group' => [
130 130
                     '_id' => [
131 131
                         '$dateToString' => ['date' => '$created_at', 'format' => $intervalFormat],
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 $aggregate[] = ['$unwind' => '$'.Str::before($groupBy, '.')];
158 158
             }
159 159
 
160
-            $aggregate[] =  [
160
+            $aggregate[] = [
161 161
                 '$group' => [
162 162
                     '_id'   => '$'.$groupBy,
163 163
                     'count' => [
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
             ];
178 178
         }
179 179
 
180
-        $data = $model::raw(function ($collection) use ($matchArray, $interval, $aggregate, $groupBy) {
181
-            if ($interval == 'count' && ! $groupBy) {
180
+        $data = $model::raw(function($collection) use ($matchArray, $interval, $aggregate, $groupBy) {
181
+            if ($interval == 'count' && !$groupBy) {
182 182
                 return $collection->count($matchArray);
183 183
             }
184 184
 
Please login to merge, or discard this patch.