Passed
Pull Request — master (#933)
by Maxim
36:02 queued 25:52
created
src/Router/tests/Fixtures/TestController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
         return $id;
30 30
     }
31 31
 
32
-    public function defaultInt(string|int $id = 1): string
32
+    public function defaultInt(string | int $id = 1): string
33 33
     {
34 34
         $result = \is_int($id) ? 'int: ' : 'string: ';
35 35
 
36
-        return $result . $id;
36
+        return $result.$id;
37 37
     }
38 38
 
39 39
     public function echo(): void
Please login to merge, or discard this patch.
src/Hmvc/src/AbstractCore.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
     public function __construct(
25 25
         /** @internal */
26 26
         protected ContainerInterface $container
27
-    ) {
27
+    ){
28 28
         // resolver is usually the container itself
29 29
         $this->resolver = $container->get(ResolverInterface::class);
30 30
     }
31 31
 
32 32
     public function callAction(string $controller, string $action, array $parameters = []): mixed
33 33
     {
34
-        try {
34
+        try{
35 35
             $method = new \ReflectionMethod($controller, $action);
36
-        } catch (\ReflectionException $e) {
36
+        }catch (\ReflectionException $e){
37 37
             throw new ControllerException(
38 38
                 \sprintf('Invalid action `%s`->`%s`', $controller, $action),
39 39
                 ControllerException::BAD_ACTION,
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
             );
42 42
         }
43 43
 
44
-        if ($method->isStatic() || !$method->isPublic()) {
44
+        if ($method->isStatic() || !$method->isPublic()){
45 45
             throw new ControllerException(
46 46
                 \sprintf('Invalid action `%s`->`%s`', $controller, $action),
47 47
                 ControllerException::BAD_ACTION
48 48
             );
49 49
         }
50 50
 
51
-        try {
51
+        try{
52 52
             $args = $this->resolveArguments($method, $parameters);
53
-        } catch (ArgumentResolvingException|InvalidArgumentException $e) {
53
+        }catch (ArgumentResolvingException | InvalidArgumentException $e){
54 54
             throw new ControllerException(
55 55
                 \sprintf('Missing/invalid parameter %s of `%s`->`%s`', $e->getParameter(), $controller, $action),
56 56
                 ControllerException::BAD_ARGUMENT,
57 57
                 $e
58 58
             );
59
-        } catch (ContainerExceptionInterface $e) {
59
+        }catch (ContainerExceptionInterface $e){
60 60
             throw new ControllerException(
61 61
                 $e->getMessage(),
62 62
                 ControllerException::ERROR,
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
     protected function resolveArguments(\ReflectionMethod $method, array $parameters): array
75 75
     {
76
-        foreach ($method->getParameters() as $parameter) {
76
+        foreach ($method->getParameters() as $parameter){
77 77
             $name = $parameter->getName();
78 78
             if (
79 79
                 \array_key_exists($name, $parameters) &&
80 80
                 $parameters[$name] === null &&
81 81
                 $parameter->isDefaultValueAvailable()
82
-            ) {
82
+            ){
83 83
                 $parameters[$name] = $parameter->getDefaultValue();
84 84
             }
85 85
         }
Please login to merge, or discard this patch.