@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $aggregate = []; |
68 | 68 | $model = $this->namespace.Str::studly(Str::singular($collection)).'Analytic'; |
69 | 69 | |
70 | - if (! class_exists($model)) { |
|
70 | + if (!class_exists($model)) { |
|
71 | 71 | throw new InvalidArgumentException("Model {$model} does not exist."); |
72 | 72 | } |
73 | 73 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $intervalFormat = '%Y-%m'; |
111 | 111 | } |
112 | 112 | |
113 | - $aggregate[] = [ |
|
113 | + $aggregate[] = [ |
|
114 | 114 | '$group' => [ |
115 | 115 | '_id' => [ |
116 | 116 | '$dateToString' => ['date' => '$created_at', 'format' => $intervalFormat], |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ]; |
136 | 136 | } |
137 | 137 | |
138 | - $data = $model::raw(function ($collection) use ($matchArray, $interval, $aggregate) { |
|
138 | + $data = $model::raw(function($collection) use ($matchArray, $interval, $aggregate) { |
|
139 | 139 | if ($interval == 'count') { |
140 | 140 | return $collection->count($matchArray); |
141 | 141 | } |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | */ |
158 | 158 | private function toModels($data, $model = null) |
159 | 159 | { |
160 | - if (! $model) { |
|
160 | + if (!$model) { |
|
161 | 161 | $model = '\Jenssegers\Mongodb\Eloquent\Model'; |
162 | 162 | } |
163 | 163 | |
164 | - if (! class_exists($model)) { |
|
164 | + if (!class_exists($model)) { |
|
165 | 165 | throw new InvalidArgumentException("Model {$model} does not exist."); |
166 | 166 | } |
167 | 167 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if ($modelId) { |
206 | 206 | $model = $modelClass::find($modelId); |
207 | 207 | |
208 | - if ($model && ! $model->canViewAnalytic($user)) { |
|
208 | + if ($model && !$model->canViewAnalytic($user)) { |
|
209 | 209 | return false; |
210 | 210 | } |
211 | 211 | } |