Test Failed
Pull Request — master (#803)
by butschster
06:40
created
src/Framework/Filter/ValidationHandlerMiddleware.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
     public function __construct(
28 28
         ContainerInterface $container,
29 29
         ?ErrorsRendererInterface $renderErrors = null
30
-    ) {
30
+    ){
31 31
         $this->renderErrors = $renderErrors ?? $container->get(JsonErrorsRenderer::class);
32 32
     }
33 33
 
34 34
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
35 35
     {
36
-        try {
36
+        try{
37 37
             return $handler->handle($request);
38
-        } catch (ValidationException $e) {
38
+        }catch (ValidationException $e){
39 39
             return $this->renderErrors->render($e->errors, $e->context);
40 40
         }
41 41
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,12 @@
 block discarded – undo
33 33
 
34 34
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
35 35
     {
36
-        try {
36
+        try
37
+        {
37 38
             return $handler->handle($request);
38
-        } catch (ValidationException $e) {
39
+        }
40
+        catch (ValidationException $e)
41
+        {
39 42
             return $this->renderErrors->render($e->errors, $e->context);
40 43
         }
41 44
     }
Please login to merge, or discard this patch.
src/Framework/Filter/JsonErrorsRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         private readonly ResponseWrapper $wrapper
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function render(array $errors, mixed $context = null): ResponseInterface
Please login to merge, or discard this patch.
src/Filters/src/ErrorMapper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         private readonly array $schema
13
-    ) {
13
+    ){
14 14
     }
15 15
 
16 16
     /**
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     {
22 22
         // De-mapping
23 23
         $mapped = [];
24
-        foreach ($errors as $field => $message) {
25
-            if (!isset($this->schema[$field])) {
24
+        foreach ($errors as $field => $message){
25
+            if (!isset($this->schema[$field])){
26 26
                 $mapped[$field] = $message;
27 27
                 continue;
28 28
             }
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
      */
41 41
     private function mount(array &$array, string $path, mixed $message): void
42 42
     {
43
-        if ($path === '.') {
43
+        if ($path === '.'){
44 44
             throw new SchemaException(
45 45
                 \sprintf('Unable to mount error `%s` to `%s` (root path is forbidden)', $message, $path)
46 46
             );
47 47
         }
48 48
 
49 49
         $step = \explode('.', $path);
50
-        while ($name = \array_shift($step)) {
50
+        while ($name = \array_shift($step)){
51 51
             $array = &$array[$name];
52 52
         }
53 53
 
Please login to merge, or discard this patch.