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 Cristian
29:54 queued 14:57
created
src/app/Library/Uploaders/Support/FileNameGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 
9 9
 class FileNameGenerator implements FileNameGeneratorInterface
10 10
 {
11
-    public function getName(string|UploadedFile $file): string
11
+    public function getName(string | UploadedFile $file): string
12 12
     {
13 13
         return $this->getFileName($file).'.'.$this->getExtensionFromFile($file);
14 14
     }
15 15
 
16
-    private function getExtensionFromFile(string|UploadedFile $file): string
16
+    private function getExtensionFromFile(string | UploadedFile $file): string
17 17
     {
18 18
         return is_a($file, UploadedFile::class, true) ? $file->extension() : Str::after(mime_content_type($file), '/');
19 19
     }
20 20
 
21
-    private function getFileName(string|UploadedFile $file): string
21
+    private function getFileName(string | UploadedFile $file): string
22 22
     {
23 23
         if (is_file($file)) {
24 24
             return Str::of($file->getClientOriginalName())->beforeLast('.')->slug()->append('-'.Str::random(4));
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Support/Interfaces/FileNameGeneratorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 interface FileNameGeneratorInterface
8 8
 {
9
-    public function getName(string|UploadedFile $file): string;
9
+    public function getName(string | UploadedFile $file): string;
10 10
 }
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Support/UploadersRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function markAsHandled(string $objectName): void
33 33
     {
34
-        if (! in_array($objectName, $this->handledUploaders)) {
34
+        if (!in_array($objectName, $this->handledUploaders)) {
35 35
             $this->handledUploaders[] = $objectName;
36 36
         }
37 37
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function registerRepeatableUploader(string $uploadName, UploaderInterface $uploader): void
83 83
     {
84
-        if (! array_key_exists($uploadName, $this->repeatableUploaders) || ! in_array($uploader, $this->repeatableUploaders[$uploadName])) {
84
+        if (!array_key_exists($uploadName, $this->repeatableUploaders) || !in_array($uploader, $this->repeatableUploaders[$uploadName])) {
85 85
             $this->repeatableUploaders[$uploadName][] = $uploader;
86 86
         }
87 87
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function getRegisteredUploadNames(string $uploadName): array
117 117
     {
118
-        return array_map(function ($uploader) {
118
+        return array_map(function($uploader) {
119 119
             return $uploader->getName();
120 120
         }, $this->getRepeatableUploadersFor($uploadName));
121 121
     }
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Support/Interfaces/UploaderInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     /**
11 11
      * Static constructor function.
12 12
      */
13
-    public static function for(array $field, array $configuration): UploaderInterface;
13
+    public static function for (array $field, array $configuration): UploaderInterface;
14 14
 
15 15
     /**
16 16
      * Default implementation functions.
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function getExpirationTimeInMinutes(): int;
45 45
 
46
-    public function getFileName(string|UploadedFile $file): string;
46
+    public function getFileName(string | UploadedFile $file): string;
47 47
 
48 48
     public function getRepeatableContainerName(): ?string;
49 49
 
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Support/Traits/HandleRepeatableUploads.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         foreach (app('UploadersRepository')->getRepeatableUploadersFor($this->getRepeatableContainerName()) as $uploader) {
76 76
             $uploadedValues = $uploader->uploadRepeatableFiles($values->pluck($uploader->getName())->toArray(), $this->getPreviousRepeatableValues($entry, $uploader));
77 77
 
78
-            $values = $values->map(function ($item, $key) use ($uploadedValues, $uploader) {
78
+            $values = $values->map(function($item, $key) use ($uploadedValues, $uploader) {
79 79
                 $item[$uploader->getName()] = $uploadedValues[$key] ?? null;
80 80
 
81 81
                 return $item;
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 
105 105
         $repeatableValues = collect($entry->{$this->getName()});
106 106
         foreach (app('UploadersRepository')->getRepeatableUploadersFor($this->getRepeatableContainerName()) as $upload) {
107
-            if (! $upload->shouldDeleteFiles()) {
107
+            if (!$upload->shouldDeleteFiles()) {
108 108
                 continue;
109 109
             }
110 110
             $values = $repeatableValues->pluck($upload->getName())->toArray();
111 111
             foreach ($values as $value) {
112
-                if (! $value) {
112
+                if (!$value) {
113 113
                     continue;
114 114
                 }
115 115
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Given two multidimensional arrays/collections, merge them recursively.
134 134
      */
135
-    protected function mergeValuesRecursive(array|Collection $array1, array|Collection $array2): array|Collection
135
+    protected function mergeValuesRecursive(array | Collection $array1, array | Collection $array2): array | Collection
136 136
     {
137 137
         $merged = $array1;
138 138
         foreach ($array2 as $key => &$value) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $items = CRUD::getRequest()->input('_order_'.$this->getRepeatableContainerName()) ?? [];
156 156
 
157
-        array_walk($items, function (&$key, $value) {
157
+        array_walk($items, function(&$key, $value) {
158 158
             $requestValue = $key[$this->getName()] ?? null;
159 159
             $key = $this->handleMultipleFiles ? (is_string($requestValue) ? explode(',', $requestValue) : $requestValue) : $requestValue;
160 160
         });
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     {
167 167
         $previousValues = json_decode($entry->getOriginal($uploader->getRepeatableContainerName()), true);
168 168
 
169
-        if (! empty($previousValues)) {
169
+        if (!empty($previousValues)) {
170 170
             $previousValues = array_column($previousValues, $uploader->getName());
171 171
         }
172 172
 
Please login to merge, or discard this patch.