@@ -50,7 +50,9 @@ |
||
50 | 50 | |
51 | 51 | private function matrix(array $keys, array $values): array |
52 | 52 | { |
53 | - if(empty($values)) return []; |
|
53 | + if(empty($values)) { |
|
54 | + return []; |
|
55 | + } |
|
54 | 56 | |
55 | 57 | return array_fill_keys($keys, reset($values)); |
56 | 58 | } |
@@ -14,7 +14,9 @@ |
||
14 | 14 | { |
15 | 15 | $payload = $this->emptyPayload(); |
16 | 16 | |
17 | - if(!$value || !is_array($value)) return $payload; |
|
17 | + if(!$value || !is_array($value)) { |
|
18 | + return $payload; |
|
19 | + } |
|
18 | 20 | |
19 | 21 | foreach([MediaRequest::NEW, MediaRequest::REPLACE, MediaRequest::DETACH] as $action) { |
20 | 22 | if(isset($value[$action])){ |
@@ -10,7 +10,9 @@ |
||
10 | 10 | protected function refersToExistingAsset($value): bool |
11 | 11 | { |
12 | 12 | // Faster check to see if there is an asset id passed or not. |
13 | - if(is_string($value) && $this->isValidJson($value)) return false; |
|
13 | + if(is_string($value) && $this->isValidJson($value)) { |
|
14 | + return false; |
|
15 | + } |
|
14 | 16 | |
15 | 17 | return !is_null($this->existingAsset($value)); |
16 | 18 | } |
@@ -31,7 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | protected function sluggifyFilename(string $filename): string |
33 | 33 | { |
34 | - if(false === strpos($filename, '.')) return $filename; |
|
34 | + if(false === strpos($filename, '.')) { |
|
35 | + return $filename; |
|
36 | + } |
|
35 | 37 | |
36 | 38 | $extension = substr($filename, strrpos($filename, '.') + 1); |
37 | 39 | $filename = substr($filename, 0, strrpos($filename, '.')); |
@@ -33,7 +33,9 @@ |
||
33 | 33 | foreach($files as $k => $file) { |
34 | 34 | |
35 | 35 | // If the passed value is null, we do not want to process it. |
36 | - if(!$file) continue; |
|
36 | + if(!$file) { |
|
37 | + continue; |
|
38 | + } |
|
37 | 39 | |
38 | 40 | $mediaRequest->add($action, new MediaRequestInput( |
39 | 41 | $file, $locale, $field->getKey(), ['index' => $k] // index key is used for e.g. replace method to indicate the current asset id |