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
Push — master ( a03c4e...c1988a )
by Cristian
13:09 queued 13s
created
src/app/Library/CrudPanel/CrudPanel.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function setModel($model_namespace)
103 103
     {
104
-        if (! class_exists($model_namespace)) {
104
+        if (!class_exists($model_namespace)) {
105 105
             throw new \Exception('The model does not exist.', 500);
106 106
         }
107 107
 
108
-        if (! method_exists($model_namespace, 'hasCrudTrait')) {
108
+        if (!method_exists($model_namespace, 'hasCrudTrait')) {
109 109
             throw new \Exception('Please use CrudTrait on the model.', 500);
110 110
         }
111 111
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     {
169 169
         $complete_route = $route.'.index';
170 170
 
171
-        if (! \Route::has($complete_route)) {
171
+        if (!\Route::has($complete_route)) {
172 172
             throw new \Exception('There are no routes for this route name.', 404);
173 173
         }
174 174
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function getFirstOfItsTypeInArray($type, $array)
271 271
     {
272
-        return Arr::first($array, function ($item) use ($type) {
272
+        return Arr::first($array, function($item) use ($type) {
273 273
             return $item['type'] == $type;
274 274
         });
275 275
     }
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
 
287 287
     public function sync($type, $fields, $attributes)
288 288
     {
289
-        if (! empty($this->{$type})) {
290
-            $this->{$type} = array_map(function ($field) use ($fields, $attributes) {
289
+        if (!empty($this->{$type})) {
290
+            $this->{$type} = array_map(function($field) use ($fields, $attributes) {
291 291
                 if (in_array($field['name'], (array) $fields)) {
292 292
                     $field = array_merge($field, $attributes);
293 293
                 }
@@ -318,15 +318,15 @@  discard block
 block discarded – undo
318 318
     {
319 319
         $relationArray = explode('.', $relationString);
320 320
 
321
-        if (! isset($length)) {
321
+        if (!isset($length)) {
322 322
             $length = count($relationArray);
323 323
         }
324 324
 
325
-        if (! isset($model)) {
325
+        if (!isset($model)) {
326 326
             $model = $this->model;
327 327
         }
328 328
 
329
-        $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) {
329
+        $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) {
330 330
             try {
331 331
                 $result = $obj->$method();
332 332
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
             if (is_array($entries)) {
363 363
                 //if attribute does not exist in main array we have more than one entry OR the attribute
364 364
                 //is an acessor that is not in $appends property of model.
365
-                if (! isset($entries[$attribute])) {
365
+                if (!isset($entries[$attribute])) {
366 366
                     //we first check if we don't have the attribute because it's and acessor that is not in appends.
367 367
                     if ($model_instance->hasGetMutator($attribute) && isset($entries[$modelKey])) {
368 368
                         $entry_in_database = $model_instance->find($entries[$modelKey]);
@@ -402,21 +402,21 @@  discard block
 block discarded – undo
402 402
      */
403 403
     public function parseTranslatableAttributes($model, $attribute, $value)
404 404
     {
405
-        if (! method_exists($model, 'isTranslatableAttribute')) {
405
+        if (!method_exists($model, 'isTranslatableAttribute')) {
406 406
             return $value;
407 407
         }
408 408
 
409
-        if (! $model->isTranslatableAttribute($attribute)) {
409
+        if (!$model->isTranslatableAttribute($attribute)) {
410 410
             return $value;
411 411
         }
412 412
 
413
-        if (! is_array($value)) {
413
+        if (!is_array($value)) {
414 414
             $decodedAttribute = json_decode($value, true);
415 415
         } else {
416 416
             $decodedAttribute = $value;
417 417
         }
418 418
 
419
-        if (is_array($decodedAttribute) && ! empty($decodedAttribute)) {
419
+        if (is_array($decodedAttribute) && !empty($decodedAttribute)) {
420 420
             if (isset($decodedAttribute[app()->getLocale()])) {
421 421
                 return $decodedAttribute[app()->getLocale()];
422 422
             } else {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         $relation = $model->{$firstRelationName};
444 444
 
445 445
         $results = [];
446
-        if (! is_null($relation)) {
446
+        if (!is_null($relation)) {
447 447
             if ($relation instanceof Collection) {
448 448
                 $currentResults = $relation->all();
449 449
             } elseif (is_array($relation)) {
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 
457 457
             array_shift($relationArray);
458 458
 
459
-            if (! empty($relationArray)) {
459
+            if (!empty($relationArray)) {
460 460
                 foreach ($currentResults as $currentResult) {
461 461
                     $results = array_merge_recursive($results, $this->getRelatedEntries($currentResult, implode('.', $relationArray)));
462 462
                 }
Please login to merge, or discard this patch.