@@ -31,7 +31,7 @@ |
||
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | - $event->setController(function () use ($errorResponse) { |
|
34 | + $event->setController(function() use ($errorResponse) { |
|
35 | 35 | return $errorResponse; |
36 | 36 | }); |
37 | 37 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | if (!$options) { |
52 | 52 | $options = []; |
53 | 53 | } |
54 | - $options['fields'] = array_map(function ($constraints) use ($options) { |
|
54 | + $options['fields'] = array_map(function($constraints) use ($options) { |
|
55 | 55 | if ($constraints instanceof Assert\Existence || !array_key_exists('groups', $options)) { |
56 | 56 | return $constraints; |
57 | 57 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | return new JsonResponse([ |
27 | 27 | 'message' => 'Please check your data', |
28 | - 'errors' => array_map(function (ConstraintViolation $violation) { |
|
28 | + 'errors' => array_map(function(ConstraintViolation $violation) { |
|
29 | 29 | return [ |
30 | 30 | 'path' => $violation->getPropertyPath(), |
31 | 31 | 'message' => $violation->getMessage(), |
@@ -111,8 +111,7 @@ |
||
111 | 111 | $actionReflection = $classReflection->getMethod($action[1]); |
112 | 112 | } elseif ($action instanceof \Closure || is_string($action)) { |
113 | 113 | $actionReflection = new \ReflectionFunction($action); |
114 | - } |
|
115 | - else { |
|
114 | + } else { |
|
116 | 115 | $classReflection = new \ReflectionClass($action); |
117 | 116 | $actionReflection = $classReflection->getMethod('__invoke'); |
118 | 117 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $payload = $this->resolvePayload($requestObject, $request); |
66 | 66 | |
67 | 67 | $reflectionClass = new \ReflectionClass($requestObject); |
68 | - foreach($payload as $key => $item) { |
|
68 | + foreach ($payload as $key => $item) { |
|
69 | 69 | if ($reflectionClass->hasProperty($key) === true) { |
70 | 70 | $property = $reflectionClass->getProperty($key); |
71 | 71 | $property->setAccessible(true); |