@@ -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; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | // Custom set methods - default is the generic setField() method. |
34 | - $methodName = 'set' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
34 | + $methodName = 'set'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
35 | 35 | (method_exists($this, $methodName)) |
36 | 36 | ? $this->$methodName($field, $request) |
37 | 37 | : $this->setField($field, $request); |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | protected function detectCustomSaveMethods(Field $field): bool |
50 | 50 | { |
51 | - $saveMethodByKey = 'save' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
52 | - $saveMethodByType = 'save' . ucfirst(Str::camel($field->getType()->get())) . 'Fields'; |
|
51 | + $saveMethodByKey = 'save'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
52 | + $saveMethodByType = 'save'.ucfirst(Str::camel($field->getType()->get())).'Fields'; |
|
53 | 53 | |
54 | 54 | foreach ([$saveMethodByKey, $saveMethodByType] as $saveMethod) { |
55 | 55 | foreach ($this->assistants() as $assistant) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | // Make our media fields able to be translatable as well... |
98 | 98 | if ($field->ofType(FieldType::FILE, FieldType::IMAGE)) { |
99 | - throw new \Exception('Cannot process the ' . $field->getKey() . ' media field. Currently no support for translatable media files. We should fix this!'); |
|
99 | + throw new \Exception('Cannot process the '.$field->getKey().' media field. Currently no support for translatable media files. We should fix this!'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // 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) |
@@ -40,7 +40,7 @@ |
||
40 | 40 | private function addCustomValidationMessage($attribute, $params, $validator): void |
41 | 41 | { |
42 | 42 | $validator->setCustomMessages([ |
43 | - 'filefield_min' => 'De :attribute is te klein en dient groter te zijn dan ' . implode(',', $params) . 'Kb.', |
|
43 | + 'filefield_min' => 'De :attribute is te klein en dient groter te zijn dan '.implode(',', $params).'Kb.', |
|
44 | 44 | ]); |
45 | 45 | |
46 | 46 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | private function addCustomValidationMessage($attribute, $params, $validator): void |
63 | 63 | { |
64 | 64 | $validator->setCustomMessages([ |
65 | - 'imagefield_max' => 'De :attribute is te groot en dient kleiner te zijn dan ' . implode(',', $params) . 'Kb.', |
|
65 | + 'imagefield_max' => 'De :attribute is te groot en dient kleiner te zijn dan '.implode(',', $params).'Kb.', |
|
66 | 66 | ]); |
67 | 67 | |
68 | 68 | if (!isset($validator->customAttributes[$attribute])) { |