Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — master (#2448)
by Cristian
23:39 queued 10:10
created
src/app/Library/CrudPanel/CrudPanel.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function setRequest($request = null)
72 72
     {
73
-        if (! $request) {
73
+        if (!$request) {
74 74
             $request = \Request::instance();
75 75
         }
76 76
         $this->request = $request;
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function setModel($model_namespace)
92 92
     {
93
-        if (! class_exists($model_namespace)) {
93
+        if (!class_exists($model_namespace)) {
94 94
             throw new \Exception('The model does not exist.', 500);
95 95
         }
96 96
 
97
-        if (! method_exists($model_namespace, 'hasCrudTrait')) {
97
+        if (!method_exists($model_namespace, 'hasCrudTrait')) {
98 98
             throw new \Exception('Please use CrudTrait on the model.', 500);
99 99
         }
100 100
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $complete_route = $route.'.index';
159 159
 
160
-        if (! \Route::has($complete_route)) {
160
+        if (!\Route::has($complete_route)) {
161 161
             throw new \Exception('There are no routes for this route name.', 404);
162 162
         }
163 163
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function getFirstOfItsTypeInArray($type, $array)
260 260
     {
261
-        return Arr::first($array, function ($item) use ($type) {
261
+        return Arr::first($array, function($item) use ($type) {
262 262
             return $item['type'] == $type;
263 263
         });
264 264
     }
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
 
276 276
     public function sync($type, $fields, $attributes)
277 277
     {
278
-        if (! empty($this->{$type})) {
279
-            $this->{$type} = array_map(function ($field) use ($fields, $attributes) {
278
+        if (!empty($this->{$type})) {
279
+            $this->{$type} = array_map(function($field) use ($fields, $attributes) {
280 280
                 if (in_array($field['name'], (array) $fields)) {
281 281
                     $field = array_merge($field, $attributes);
282 282
                 }
@@ -307,15 +307,15 @@  discard block
 block discarded – undo
307 307
     {
308 308
         $relationArray = explode('.', $relationString);
309 309
 
310
-        if (! isset($length)) {
310
+        if (!isset($length)) {
311 311
             $length = count($relationArray);
312 312
         }
313 313
 
314
-        if (! isset($model)) {
314
+        if (!isset($model)) {
315 315
             $model = $this->model;
316 316
         }
317 317
 
318
-        $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) {
318
+        $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) {
319 319
             return $obj->$method()->getRelated();
320 320
         }, $model);
321 321
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         $attributes = [];
341 341
         foreach ($endModels as $model => $entries) {
342 342
             $modelKey = (new $model())->getKeyName();
343
-            if (is_array($entries) && ! isset($entries[$attribute])) {
343
+            if (is_array($entries) && !isset($entries[$attribute])) {
344 344
                 foreach ($entries as $entry) {
345 345
                     $attributes[$entry[$modelKey]] = $entry[$attribute];
346 346
                 }
@@ -371,21 +371,21 @@  discard block
 block discarded – undo
371 371
         $currentResults = [];
372 372
 
373 373
         $results = [];
374
-        if (! is_null($relation)) {
375
-            if ($relation instanceof Collection && ! $relation->isEmpty()) {
374
+        if (!is_null($relation)) {
375
+            if ($relation instanceof Collection && !$relation->isEmpty()) {
376 376
                 $currentResults[get_class($relation->first())] = $relation->toArray();
377
-            } elseif (is_array($relation) && ! empty($relation)) {
377
+            } elseif (is_array($relation) && !empty($relation)) {
378 378
                 $currentResults[get_class($relation->first())] = $relation;
379 379
             } else {
380 380
                 //relation must be App\Models\Article or App\Models\Category
381
-                if (! $relation instanceof Collection && ! empty($relation)) {
381
+                if (!$relation instanceof Collection && !empty($relation)) {
382 382
                     $currentResults[get_class($relation)] = $relation->toArray();
383 383
                 }
384 384
             }
385 385
 
386 386
             array_shift($relationArray);
387 387
 
388
-            if (! empty($relationArray)) {
388
+            if (!empty($relationArray)) {
389 389
                 foreach ($currentResults as $model => $currentResult) {
390 390
                     $results[$model] = array_merge($results[$model], $this->getRelatedEntries($currentResult, implode('.', $relationArray)));
391 391
                 }
Please login to merge, or discard this patch.