@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | $this->optional = false; |
85 | 85 | |
86 | - $this->add(function ($value, $nameKey) { |
|
86 | + $this->add(function($value, $nameKey) { |
|
87 | 87 | if (is_null($value)) { |
88 | 88 | $this->createError('required', $value, $nameKey); |
89 | 89 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function anyOf(array $vals) |
129 | 129 | { |
130 | - $this->add(function ($value, $nameKey) use ($vals) { |
|
130 | + $this->add(function($value, $nameKey) use ($vals) { |
|
131 | 131 | if (!in_array($value, $vals)) { |
132 | 132 | return $this->createError('anyof', $value, $nameKey); |
133 | 133 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function invalid(array $vals) |
146 | 146 | { |
147 | - return $this->add(function ($value, $nameKey) use ($vals) { |
|
147 | + return $this->add(function($value, $nameKey) use ($vals) { |
|
148 | 148 | if (in_array($value, $vals)) { |
149 | 149 | return $this->createError('invalid', $value, $nameKey); |
150 | 150 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function errorMessages(array $errorMessages) |
213 | 213 | { |
214 | - $errorMessages = array_map(function ($errorMessage) { |
|
214 | + $errorMessages = array_map(function($errorMessage) { |
|
215 | 215 | if (is_string($errorMessage)) { |
216 | 216 | $errorMessage = ['message' => $errorMessage]; |
217 | 217 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | $errorHandler = $this->errorHandlers[$key]; |
246 | 246 | if (!array_key_exists('message_formatter', $errorHandler)) { |
247 | - $messageFormatter = function ($template, $value, $validationValue = null) { |
|
247 | + $messageFormatter = function($template, $value, $validationValue = null) { |
|
248 | 248 | return sprintf($template, $value, $validationValue); |
249 | 249 | }; |
250 | 250 | } else { |