We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function markAsHandled(string $objectName): void |
36 | 36 | { |
37 | - if (! in_array($objectName, $this->handledUploaders)) { |
|
37 | + if (!in_array($objectName, $this->handledUploaders)) { |
|
38 | 38 | $this->handledUploaders[] = $objectName; |
39 | 39 | } |
40 | 40 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function registerRepeatableUploader(string $uploadName, UploaderInterface $uploader): void |
86 | 86 | { |
87 | - if (! array_key_exists($uploadName, $this->repeatableUploaders) || ! in_array($uploader, $this->repeatableUploaders[$uploadName])) { |
|
87 | + if (!array_key_exists($uploadName, $this->repeatableUploaders) || !in_array($uploader, $this->repeatableUploaders[$uploadName])) { |
|
88 | 88 | $this->repeatableUploaders[$uploadName][] = $uploader; |
89 | 89 | } |
90 | 90 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function getRegisteredUploadNames(string $uploadName): array |
120 | 120 | { |
121 | - return array_map(function ($uploader) { |
|
121 | + return array_map(function($uploader) { |
|
122 | 122 | return $uploader->getName(); |
123 | 123 | }, $this->getRepeatableUploadersFor($uploadName)); |
124 | 124 | } |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function getUploaderInstance(string $requestInputName, array $crudObject): UploaderInterface |
145 | 145 | { |
146 | - if (! $this->isValidUploadField($requestInputName)) { |
|
146 | + if (!$this->isValidUploadField($requestInputName)) { |
|
147 | 147 | abort(500, 'Invalid field for upload.'); |
148 | 148 | } |
149 | 149 | |
150 | - if(strpos($requestInputName, '#') !== false) { |
|
150 | + if (strpos($requestInputName, '#') !== false) { |
|
151 | 151 | $repeatableContainerName = Str::before($requestInputName, '#'); |
152 | 152 | $requestInputName = Str::after($requestInputName, '#'); |
153 | 153 | $uploaders = $this->getRepeatableUploadersFor($repeatableContainerName); |
@@ -155,12 +155,12 @@ discard block |
||
155 | 155 | dd('here'); |
156 | 156 | } |
157 | 157 | |
158 | - if (! $uploadType = $this->getUploadCrudObjectMacroType($crudObject)) { |
|
158 | + if (!$uploadType = $this->getUploadCrudObjectMacroType($crudObject)) { |
|
159 | 159 | abort(500, 'There is no uploader defined for the given field type.'); |
160 | 160 | } |
161 | 161 | |
162 | 162 | $uploaderConfiguration = $crudObject[$uploadType] ?? []; |
163 | - $uploaderConfiguration = ! is_array($uploaderConfiguration) ? [] : $uploaderConfiguration; |
|
163 | + $uploaderConfiguration = !is_array($uploaderConfiguration) ? [] : $uploaderConfiguration; |
|
164 | 164 | $uploaderClass = $this->getUploadFor($crudObject['type'], $uploadType); |
165 | 165 | return new $uploaderClass(['name' => $requestInputName], $uploaderConfiguration); |
166 | 166 | } |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | if (Str::contains($fieldName, '#')) { |
179 | 179 | $container = Str::before($fieldName, '#'); |
180 | 180 | $fieldName = Str::after($fieldName, '#'); |
181 | - $field = array_filter(CRUD::fields()[$container]['subfields'] ?? [], function ($item) use ($fieldName) { |
|
181 | + $field = array_filter(CRUD::fields()[$container]['subfields'] ?? [], function($item) use ($fieldName) { |
|
182 | 182 | return $item['name'] === $fieldName && in_array($item['type'], $this->getAjaxFieldUploadTypes($fieldName)); |
183 | 183 | }); |
184 | 184 | |
185 | - return ! empty($field); |
|
185 | + return !empty($field); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | return isset(CRUD::fields()[$fieldName]) && in_array(CRUD::fields()[$fieldName]['type'], $this->getAjaxFieldUploadTypes($fieldName)); |