@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $this->values = $values; |
| 30 | 30 | $this->errorFormatter = is_callable($errorFormatter) ? |
| 31 | - $errorFormatter : |
|
| 32 | - function ($values, $data) { |
|
| 31 | + $errorFormatter : function($values, $data) { |
|
| 33 | 32 | return [self::NOT_IN_ARRAY]; |
| 34 | 33 | }; |
| 35 | 34 | } |
@@ -48,7 +47,7 @@ discard block |
||
| 48 | 47 | { |
| 49 | 48 | return new self( |
| 50 | 49 | $values, |
| 51 | - function (array $values, $data) use ($translator) { |
|
| 50 | + function(array $values, $data) use ($translator) { |
|
| 52 | 51 | return [$translator->translate(self::NOT_IN_ARRAY)]; |
| 53 | 52 | } |
| 54 | 53 | ); |
@@ -56,7 +55,7 @@ discard block |
||
| 56 | 55 | |
| 57 | 56 | public function validate($data, array $context = []): ValidationResult |
| 58 | 57 | { |
| 59 | - if (! in_array($data, $this->values, true)) { |
|
| 58 | + if (!in_array($data, $this->values, true)) { |
|
| 60 | 59 | return ValidationResult::errors(($this->errorFormatter)($this->values, $data)); |
| 61 | 60 | } |
| 62 | 61 | |