@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | return $value; |
90 | - } catch (ValidationException $validationException) { |
|
90 | + }catch (ValidationException $validationException) { |
|
91 | 91 | if ($this->toBool) { |
92 | 92 | return false; |
93 | 93 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | { |
111 | 111 | $this->optional = false; |
112 | 112 | |
113 | - $this->add(function ($value, $nameKey) { |
|
113 | + $this->add(function($value, $nameKey) { |
|
114 | 114 | if (is_null($value)) { |
115 | 115 | $this->createError('required', $value, $nameKey); |
116 | 116 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function anyOf(array $vals) |
156 | 156 | { |
157 | - $this->add(function ($value, $nameKey) use ($vals) { |
|
157 | + $this->add(function($value, $nameKey) use ($vals) { |
|
158 | 158 | if (!in_array($value, $vals)) { |
159 | 159 | return $this->createError('anyof', $value, $nameKey); |
160 | 160 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | public function errorMessages(array $errorMessages) |
199 | 199 | { |
200 | - $errorMessages = array_map(function ($errorMessage) { |
|
200 | + $errorMessages = array_map(function($errorMessage) { |
|
201 | 201 | if (is_string($errorMessage)) { |
202 | 202 | $errorMessage = ['message' => $errorMessage]; |
203 | 203 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | $errorHandler = $this->errorHandlers[$key]; |
232 | 232 | if (!array_key_exists('message_formatter', $errorHandler)) { |
233 | - $messageFormatter = function ($template, $value, $validationValue = null) { |
|
233 | + $messageFormatter = function($template, $value, $validationValue = null) { |
|
234 | 234 | return sprintf($template, $value, $validationValue); |
235 | 235 | }; |
236 | 236 | } else { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | private function orMethod($conditions) |
35 | 35 | { |
36 | - return $this->add(function ($value, $nameKey) use ($conditions) { |
|
36 | + return $this->add(function($value, $nameKey) use ($conditions) { |
|
37 | 37 | $errors = []; |
38 | 38 | foreach ($conditions as $condition) { |
39 | 39 | if (!$condition instanceof AbstractValidator) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | private function ifThenElse($conditions) |
60 | 60 | { |
61 | - return $this->add(function ($value, $nameKey) use ($conditions) { |
|
61 | + return $this->add(function($value, $nameKey) use ($conditions) { |
|
62 | 62 | |
63 | 63 | foreach ($conditions as $condition) { |
64 | 64 | if (!isset($condition['is'])) { |