@@ -33,7 +33,7 @@ |
||
33 | 33 | $this->exceptions = $this->errors->getExceptions(); |
34 | 34 | $tmp = reset($this->exceptions); |
35 | 35 | if ($tmp) { |
36 | - $previous = reset($tmp) ? : null; |
|
36 | + $previous = reset($tmp) ?: null; |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | parent::__construct(422, 'A validation error occurred', $previous); |
@@ -110,12 +110,12 @@ discard block |
||
110 | 110 | public function getErrors(?Closure $callback = null): array |
111 | 111 | { |
112 | 112 | if (!$callback) { |
113 | - $callback = function (ErrorBagField $field) { |
|
113 | + $callback = function(ErrorBagField $field) { |
|
114 | 114 | return $field->getMessage(); |
115 | 115 | }; |
116 | 116 | } |
117 | 117 | return array_map( |
118 | - function (array $errors) use (&$callback) { |
|
118 | + function(array $errors) use (&$callback) { |
|
119 | 119 | return array_map($callback, $errors); |
120 | 120 | }, |
121 | 121 | $this->errors |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | public function getExceptions(): array |
132 | 132 | { |
133 | 133 | return array_map( |
134 | - function (array $errors) { |
|
134 | + function(array $errors) { |
|
135 | 135 | return array_filter(array_map( |
136 | - function (ErrorBagField $field) { |
|
136 | + function(ErrorBagField $field) { |
|
137 | 137 | return $field->getSource(); |
138 | 138 | }, |
139 | 139 | $errors |