@@ -59,7 +59,7 @@ |
||
59 | 59 | private function addCustomValidationMessage($attribute, $params, $validator): void |
60 | 60 | { |
61 | 61 | $validator->setCustomMessages([ |
62 | - 'imagefield_max' => ':attribute is te groot en dient kleiner te zijn dan ' . implode(',', $params) . 'Kb.', |
|
62 | + 'imagefield_max' => ':attribute is te groot en dient kleiner te zijn dan '.implode(',', $params).'Kb.', |
|
63 | 63 | ]); |
64 | 64 | |
65 | 65 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | private function addCustomValidationMessage($attribute, $params, $validator): void |
55 | 55 | { |
56 | 56 | $validator->setCustomMessages([ |
57 | - 'imagefield_min' => ':attribute is te klein en dient groter te zijn dan ' . implode(',', $params) . 'Kb.', |
|
57 | + 'imagefield_min' => ':attribute is te klein en dient groter te zijn dan '.implode(',', $params).'Kb.', |
|
58 | 58 | ]); |
59 | 59 | |
60 | 60 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $mimetype = json_decode($value)->output->type; |
39 | 39 | |
40 | 40 | return (in_array($mimetype, $parameters) || |
41 | - in_array(explode('/', $mimetype)[0] . '/*', $parameters)); |
|
41 | + in_array(explode('/', $mimetype)[0].'/*', $parameters)); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | private function addCustomValidationMessage($attribute, $params, $validator): void |
50 | 50 | { |
51 | 51 | $validator->setCustomMessages([ |
52 | - 'imagefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params), |
|
52 | + 'imagefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params), |
|
53 | 53 | ]); |
54 | 54 | |
55 | 55 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private function addCustomValidationMessage($attribute, $params, $validator): void |
39 | 39 | { |
40 | 40 | $validator->setCustomMessages([ |
41 | - 'filefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params), |
|
41 | + 'filefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params), |
|
42 | 42 | ]); |
43 | 43 | |
44 | 44 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private function addCustomValidationMessage($attribute, $params, $validator): void |
39 | 39 | { |
40 | 40 | $validator->setCustomMessages([ |
41 | - 'filefield_dimensions' => ':attribute heeft niet de juiste afmetingen: ' . implode(', ', $params), |
|
41 | + 'filefield_dimensions' => ':attribute heeft niet de juiste afmetingen: '.implode(', ', $params), |
|
42 | 42 | ]); |
43 | 43 | |
44 | 44 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private function addCustomValidationMessage($attribute, $params, $validator): void |
39 | 39 | { |
40 | 40 | $validator->setCustomMessages([ |
41 | - 'filefield_min' => ':attribute is te klein en dient groter te zijn dan ' . implode(',', $params) . 'Kb.', |
|
41 | + 'filefield_min' => ':attribute is te klein en dient groter te zijn dan '.implode(',', $params).'Kb.', |
|
42 | 42 | ]); |
43 | 43 | |
44 | 44 | if (!isset($validator->customAttributes[$attribute])) { |
@@ -76,7 +76,7 @@ |
||
76 | 76 | private function addCustomValidationMessage($attribute, $params, $validator): void |
77 | 77 | { |
78 | 78 | $validator->setCustomMessages([ |
79 | - 'imagefield_dimensions' => ':attribute heeft niet de juiste afmetingen: ' . implode(', ', $this->humanReadableParams($params)), |
|
79 | + 'imagefield_dimensions' => ':attribute heeft niet de juiste afmetingen: '.implode(', ', $this->humanReadableParams($params)), |
|
80 | 80 | ]); |
81 | 81 | |
82 | 82 | 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,8 +40,8 @@ discard block |
||
40 | 40 | |
41 | 41 | public function find(string $key): Field |
42 | 42 | { |
43 | - if(!isset($this->fields[$key])) { |
|
44 | - throw new \InvalidArgumentException('No field found by key ' . $key); |
|
43 | + if (!isset($this->fields[$key])) { |
|
44 | + throw new \InvalidArgumentException('No field found by key '.$key); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $this->fields[$key]; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | continue; |
102 | 102 | } |
103 | 103 | |
104 | - $method = 'get' . ucfirst($key); |
|
104 | + $method = 'get'.ucfirst($key); |
|
105 | 105 | |
106 | 106 | // Reject from list if value does not match expected one |
107 | 107 | if ($value && $value == $field->$method()) { |
@@ -117,30 +117,30 @@ discard block |
||
117 | 117 | |
118 | 118 | public function render(): string |
119 | 119 | { |
120 | - return array_reduce($this->fields, function (string $carry, Field $field) { |
|
121 | - return $carry . $field->render(); |
|
120 | + return array_reduce($this->fields, function(string $carry, Field $field) { |
|
121 | + return $carry.$field->render(); |
|
122 | 122 | }, ''); |
123 | 123 | } |
124 | 124 | |
125 | 125 | public function keyed($key): Fields |
126 | 126 | { |
127 | - $keys = (array) $key; |
|
127 | + $keys = (array)$key; |
|
128 | 128 | |
129 | - return new static(array_filter($this->fields, function (Field $field) use ($keys) { |
|
129 | + return new static(array_filter($this->fields, function(Field $field) use ($keys) { |
|
130 | 130 | return in_array($field->getKey(), $keys); |
131 | 131 | })); |
132 | 132 | } |
133 | 133 | |
134 | 134 | public function tagged($tag): Fields |
135 | 135 | { |
136 | - return new static(array_filter($this->fields, function (Field $field) use ($tag) { |
|
136 | + return new static(array_filter($this->fields, function(Field $field) use ($tag) { |
|
137 | 137 | return $field->tagged($tag); |
138 | 138 | })); |
139 | 139 | } |
140 | 140 | |
141 | 141 | public function untagged(): Fields |
142 | 142 | { |
143 | - return new static(array_filter($this->fields, function (Field $field) { |
|
143 | + return new static(array_filter($this->fields, function(Field $field) { |
|
144 | 144 | return $field->untagged(); |
145 | 145 | })); |
146 | 146 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function offsetGet($offset) |
183 | 183 | { |
184 | 184 | if (!isset($this->fields[$offset])) { |
185 | - throw new \RuntimeException('No field found by key [' . $offset . ']'); |
|
185 | + throw new \RuntimeException('No field found by key ['.$offset.']'); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | return $this->fields[$offset]; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | public function offsetSet($offset, $value) |
192 | 192 | { |
193 | 193 | if (!$value instanceof Field) { |
194 | - throw new \InvalidArgumentException('Passed value must be of type ' . Field::class); |
|
194 | + throw new \InvalidArgumentException('Passed value must be of type '.Field::class); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | $this->fields[$offset] = $value; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | |
222 | 222 | private function validateFields(array $fields) |
223 | 223 | { |
224 | - array_map(function (Field $field) { |
|
224 | + array_map(function(Field $field) { |
|
225 | 225 | }, $fields); |
226 | 226 | } |
227 | 227 |