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 ( b722ec...446e01 )
by Ash
03:53
created
src/APAnalytics.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
         $filters        = valid_json($filters) ? json_decode($filters) : $filters;
64 64
         $intervalFormat = '%Y-%m-%dT%H';
65 65
         $aggregate      = [];
66
-        $model          = $this->namespace . Str::studly(Str::singular($collection)) . 'Analytic';
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
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 $intervalFormat = '%Y-%m';
113 113
             }
114 114
 
115
-            $aggregate[] =  [
115
+            $aggregate[] = [
116 116
                 '$group' => [
117 117
                     '_id' => [
118 118
                         '$dateToString' => ['date' => '$created_at', 'format' => $intervalFormat],
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
             $nested = Str::contains($groupBy, '.');
142 142
 
143 143
             if ($nested) {
144
-                $aggregate[] = ['$unwind' => '$' . Str::before($groupBy, '.')];
144
+                $aggregate[] = ['$unwind' => '$'.Str::before($groupBy, '.')];
145 145
             }
146 146
 
147
-            $aggregate[] =  [
147
+            $aggregate[] = [
148 148
                 '$group' => [
149
-                    '_id'   => '$' . $groupBy,
149
+                    '_id'   => '$'.$groupBy,
150 150
                     'count' => [
151 151
                         '$sum' => 1,
152 152
                     ],
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
             ];
165 165
         }
166 166
 
167
-        $data = $model::raw(function ($collection) use ($matchArray, $interval, $aggregate, $groupBy) {
168
-            if ($interval == 'count' && ! $groupBy) {
167
+        $data = $model::raw(function($collection) use ($matchArray, $interval, $aggregate, $groupBy) {
168
+            if ($interval == 'count' && !$groupBy) {
169 169
                 return $collection->count($matchArray);
170 170
             }
171 171
 
Please login to merge, or discard this patch.