We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -31,7 +31,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | foreach (app('UploadersRepository')->getRepeatableUploadersFor($this->getRepeatableContainerName()) as $uploader) { |
| 77 | 77 | $uploadedValues = $uploader->uploadRepeatableFiles($values->pluck($uploader->getName())->toArray(), $this->getPreviousRepeatableValues($entry, $uploader)); |
| 78 | 78 | |
| 79 | - $values = $values->map(function ($item, $key) use ($uploadedValues, $uploader) { |
|
| 79 | + $values = $values->map(function($item, $key) use ($uploadedValues, $uploader) { |
|
| 80 | 80 | $item[$uploader->getName()] = $uploadedValues[$key] ?? null; |
| 81 | 81 | |
| 82 | 82 | return $item; |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $repeatableValues = collect($entry->{$this->getName()}); |
| 107 | 107 | foreach (app('UploadersRepository')->getRepeatableUploadersFor($this->getRepeatableContainerName()) as $upload) { |
| 108 | - if (! $upload->shouldDeleteFiles()) { |
|
| 108 | + if (!$upload->shouldDeleteFiles()) { |
|
| 109 | 109 | continue; |
| 110 | 110 | } |
| 111 | 111 | $values = $repeatableValues->pluck($upload->getName())->toArray(); |
| 112 | 112 | foreach ($values as $value) { |
| 113 | - if (! $value) { |
|
| 113 | + if (!$value) { |
|
| 114 | 114 | continue; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * Given two multidimensional arrays/collections, merge them recursively. |
| 134 | 134 | */ |
| 135 | - private function mergeValuesRecursive(array|Collection $array1, array|Collection $array2): array|Collection |
|
| 135 | + private 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 |
||
| 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 |
||
| 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 | |
@@ -10,7 +10,7 @@ discard block |
||
| 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 |
||
| 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 | |