@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | foreach ($replacements as $replacement) { |
97 | - $newKeySet[] = str_replace(':' . $placeholder, $replacement, $key); |
|
97 | + $newKeySet[] = str_replace(':'.$placeholder, $replacement, $key); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | // Remove all 'trans' entries for this locale |
144 | 144 | foreach ($filteredKeys as $i => $key) { |
145 | - if (Str::startsWith($key, 'trans.' . $locale)) { |
|
145 | + if (Str::startsWith($key, 'trans.'.$locale)) { |
|
146 | 146 | unset($filteredKeys[$i]); |
147 | 147 | } |
148 | 148 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $payload = Arr::get($this->payload, $key, '_notfound_'); |
164 | 164 | |
165 | 165 | // If the payload is empty and this is not the entry for the required locale |
166 | - if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.' . $this->requiredLocale)) { |
|
166 | + if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.'.$this->requiredLocale)) { |
|
167 | 167 | unset($filteredKeys[$i]); |
168 | 168 | } |
169 | 169 | } |
@@ -79,7 +79,7 @@ |
||
79 | 79 | return $value; |
80 | 80 | } |
81 | 81 | |
82 | - $value = str_replace('.', '][', $value) . ']'; |
|
82 | + $value = str_replace('.', '][', $value).']'; |
|
83 | 83 | |
84 | 84 | return substr_replace($value, '', strpos($value, ']'), 1); |
85 | 85 | } |
@@ -66,8 +66,8 @@ |
||
66 | 66 | foreach ($this->assistants() as $assistant) { |
67 | 67 | if (method_exists($assistant, $saveMethod)) { |
68 | 68 | $this->saveAssistantMethods[$field->getKey()] = ['field' => $field, |
69 | - 'method' => $saveMethod, |
|
70 | - 'assistant' => $assistant, |
|
69 | + 'method' => $saveMethod, |
|
70 | + 'assistant' => $assistant, |
|
71 | 71 | ]; |
72 | 72 | |
73 | 73 | return true; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // } |
42 | 42 | |
43 | 43 | // Custom set methods - default is the generic setField() method. |
44 | - $methodName = 'set' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
44 | + $methodName = 'set'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
45 | 45 | (method_exists($this, $methodName)) |
46 | 46 | ? $this->$methodName($field, $request) |
47 | 47 | : $this->setField($field, $request); |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | |
59 | 59 | protected function detectCustomSaveMethods(Field $field): bool |
60 | 60 | { |
61 | - $saveMethodByKey = 'save' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
62 | - $saveMethodByType = 'save' . ucfirst(Str::camel($field->getType()->get())) . 'Fields'; |
|
61 | + $saveMethodByKey = 'save'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
62 | + $saveMethodByType = 'save'.ucfirst(Str::camel($field->getType()->get())).'Fields'; |
|
63 | 63 | |
64 | 64 | foreach ([$saveMethodByKey, $saveMethodByType] as $saveMethod) { |
65 | 65 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | // Make our media fields able to be translatable as well... |
109 | 109 | if ($field->ofType(FieldType::FILE, FieldType::IMAGE, FieldType::DOCUMENT)) { |
110 | - throw new \Exception('Cannot process the ' . $field->getKey() . ' media field. Currently no support for translatable media files. We should fix this!'); |
|
110 | + throw new \Exception('Cannot process the '.$field->getKey().' media field. Currently no support for translatable media files. We should fix this!'); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | // Okay so this is a bit odd but since all translations are expected to be inside the trans |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | continue; |
67 | 67 | } |
68 | 68 | |
69 | - $method = 'get' . ucfirst($key); |
|
69 | + $method = 'get'.ucfirst($key); |
|
70 | 70 | |
71 | 71 | // Reject from list if value does not match expected one |
72 | 72 | if ($value && $value == $field->$method()) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function offsetSet($offset, $value) |
125 | 125 | { |
126 | 126 | if (!$value instanceof Field) { |
127 | - throw new \InvalidArgumentException('Passed value must be of type ' . Field::class); |
|
127 | + throw new \InvalidArgumentException('Passed value must be of type '.Field::class); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | $this->fields[$offset] = $value; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | private function validateFields(array $fields) |
156 | 156 | { |
157 | - array_map(function (Field $field) { |
|
157 | + array_map(function(Field $field) { |
|
158 | 158 | }, $fields); |
159 | 159 | } |
160 | 160 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | private function addCustomValidationMessage($attribute, $params, $validator): void |
41 | 41 | { |
42 | 42 | $validator->setCustomMessages([ |
43 | - 'filefield_mimetypes' => 'De :attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params), |
|
43 | + 'filefield_mimetypes' => 'De :attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params), |
|
44 | 44 | ]); |
45 | 45 | |
46 | 46 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | private function addCustomValidationMessage($attribute, $params, $validator): void |
41 | 41 | { |
42 | 42 | $validator->setCustomMessages([ |
43 | - 'filefield_dimensions' => 'De :attribute heeft niet de juiste afmetingen: ' . implode(', ', $params), |
|
43 | + 'filefield_dimensions' => 'De :attribute heeft niet de juiste afmetingen: '.implode(', ', $params), |
|
44 | 44 | ]); |
45 | 45 | |
46 | 46 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $mimetype = json_decode($value)->output->type; |
42 | 42 | |
43 | 43 | return (in_array($mimetype, $parameters) || |
44 | - in_array(explode('/', $mimetype)[0] . '/*', $parameters)); |
|
44 | + in_array(explode('/', $mimetype)[0].'/*', $parameters)); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | private function addCustomValidationMessage($attribute, $params, $validator): void |
53 | 53 | { |
54 | 54 | $validator->setCustomMessages([ |
55 | - 'imagefield_mimetypes' => 'De :attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params), |
|
55 | + 'imagefield_mimetypes' => 'De :attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params), |
|
56 | 56 | ]); |
57 | 57 | |
58 | 58 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | protected function getSize($attribute, $value) |
44 | 44 | { |
45 | 45 | if (!$value instanceof File) { |
46 | - throw new \InvalidArgumentException('Value is expected to be of type ' . File::class); |
|
46 | + throw new \InvalidArgumentException('Value is expected to be of type '.File::class); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | return $value->getSize() / 1024; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | private function addCustomValidationMessage($attribute, $params, $validator): void |
58 | 58 | { |
59 | 59 | $validator->setCustomMessages([ |
60 | - 'filefield_max' => 'De :attribute is te groot en dient kleiner te zijn dan ' . implode(',', $params) . 'Kb.', |
|
60 | + 'filefield_max' => 'De :attribute is te groot en dient kleiner te zijn dan '.implode(',', $params).'Kb.', |
|
61 | 61 | ]); |
62 | 62 | |
63 | 63 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | protected function validateAssetMimetypes(Asset $asset, $parameters) |
57 | 57 | { |
58 | 58 | return (in_array($asset->getMimeType(), $parameters) || |
59 | - in_array(explode('/', $asset->getMimeType())[0] . '/*', $parameters)); |
|
59 | + in_array(explode('/', $asset->getMimeType())[0].'/*', $parameters)); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | protected function validateAssetMax(Asset $asset, $parameters) |