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 — main (#4988)
by Pedro
40:53 queued 25:51
created
src/app/Library/CrudPanel/Uploads/Uploaders/Uploader.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
         $value = $this->mergeValuesRecursive($values, $files);
155 155
 
156
-        if (! $this->isRelationship) {
156
+        if (!$this->isRelationship) {
157 157
             $entry->{$this->repeatableContainerName} = json_encode($this->processRepeatableUploads($entry, $value));
158 158
         } else {
159 159
             $modelCount = CRUD::get('uploaded_'.$this->repeatableContainerName.'_count');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         foreach (app('UploadersRepository')->getRegisteredUploadersFor($this->repeatableContainerName) as $uploader) {
176 176
             $uploadedValues = $uploader->saveRepeatableFile($entry, $value->pluck($uploader->name)->toArray());
177 177
 
178
-            $value = $value->map(function ($item, $key) use ($uploadedValues, $uploader) {
178
+            $value = $value->map(function($item, $key) use ($uploadedValues, $uploader) {
179 179
                 $item[$uploader->getName()] = $uploadedValues[$key] ?? null;
180 180
 
181 181
                 return $item;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     {
255 255
         $value = $entry->{$this->name};
256 256
 
257
-        if ($this->isMultiple && ! isset($entry->getCasts()[$this->name]) && is_string($value)) {
257
+        if ($this->isMultiple && !isset($entry->getCasts()[$this->name]) && is_string($value)) {
258 258
             $entry->{$this->name} = json_decode($value, true);
259 259
         } else {
260 260
             $entry->{$this->name} = Str::after($value, $this->path);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     public function deleteUploadedFile(Model $entry)
282 282
     {
283 283
         if ($this->deleteWhenEntryIsDeleted) {
284
-            if (! in_array(SoftDeletes::class, class_uses_recursive($entry), true)) {
284
+            if (!in_array(SoftDeletes::class, class_uses_recursive($entry), true)) {
285 285
                 $this->performFileDeletion($entry);
286 286
             } else {
287 287
                 if ($entry->forceDeleting === true) {
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
 
300 300
         $repeatableValues = collect($entry->{$this->getName()});
301 301
         foreach (app('UploadersRepository')->getRegisteredUploadersFor($this->repeatableContainerName) as $upload) {
302
-            if (! $upload->deleteWhenEntryIsDeleted) {
302
+            if (!$upload->deleteWhenEntryIsDeleted) {
303 303
                 continue;
304 304
             }
305 305
             $values = $repeatableValues->pluck($upload->getName())->toArray();
306 306
             foreach ($values as $value) {
307
-                if (! $value) {
307
+                if (!$value) {
308 308
                     continue;
309 309
                 }
310 310
                 if (is_array($value)) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         $values = $entry->{$this->name};
325 325
 
326 326
         if ($this->isMultiple) {
327
-            if (! isset($entry->getCasts()[$this->name]) && is_string($values)) {
327
+            if (!isset($entry->getCasts()[$this->name]) && is_string($values)) {
328 328
                 $values = json_decode($values, true);
329 329
             }
330 330
         } else {
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
      * @param  array  $definition
353 353
      * @return self
354 354
      */
355
-    public static function for(array $crudObject, array $definition)
355
+    public static function for (array $crudObject, array $definition)
356 356
     {
357 357
         return new static($crudObject, $definition);
358 358
     }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     {
410 410
         $items = CRUD::getRequest()->input('_order_'.$this->repeatableContainerName) ?? [];
411 411
 
412
-        array_walk($items, function (&$key, $value) {
412
+        array_walk($items, function(&$key, $value) {
413 413
             $requestValue = $key[$this->name] ?? null;
414 414
             $key = $this->isMultiple ? (is_string($requestValue) ? explode(',', $requestValue) : $requestValue) : $requestValue;
415 415
         });
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     protected function getPreviousRepeatableValues(Model $entry)
437 437
     {
438 438
         $previousValues = json_decode($entry->getOriginal($this->repeatableContainerName), true);
439
-        if (! empty($previousValues)) {
439
+        if (!empty($previousValues)) {
440 440
             $previousValues = array_column($previousValues, $this->name);
441 441
         }
442 442
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Uploads/UploadersRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     public function markAsHandled(string $objectName)
19 19
     {
20
-        if (! in_array($objectName, $this->handledUploaders)) {
20
+        if (!in_array($objectName, $this->handledUploaders)) {
21 21
             $this->handledUploaders[] = $objectName;
22 22
         }
23 23
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function registerUploader(string $uploadName, $uploader)
51 51
     {
52
-        if (! array_key_exists($uploadName, $this->registeredUploaders) || ! in_array($uploader, $this->registeredUploaders[$uploadName])) {
52
+        if (!array_key_exists($uploadName, $this->registeredUploaders) || !in_array($uploader, $this->registeredUploaders[$uploadName])) {
53 53
             $this->registeredUploaders[$uploadName][] = $uploader;
54 54
         }
55 55
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function getRegisteredUploadNames(string $uploadName)
73 73
     {
74
-        return array_map(function ($uploader) {
74
+        return array_map(function($uploader) {
75 75
             return $uploader->getName();
76 76
         }, $this->getRegisteredUploadersFor($uploadName));
77 77
     }
Please login to merge, or discard this patch.