Passed
Pull Request — master (#1122)
by Aleksei
24:08
created
src/Interceptors/src/Context/Target.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
         private ?\ReflectionFunctionAbstract $reflection = null,
22 22
         private readonly ?object $object = null,
23 23
         private string $delimiter = '.',
24
-        private readonly \Closure|array|null $callable = null,
25
-    ) {
24
+        private readonly \Closure | array | null $callable = null,
25
+    ){
26 26
     }
27 27
 
28 28
     public function __toString(): string
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public static function fromReflectionMethod(
48 48
         \ReflectionFunctionAbstract $reflection,
49
-        string|object $classOrObject,
49
+        string | object $classOrObject,
50 50
     ): self {
51 51
         $method = $reflection->getName();
52 52
         $isStatic = $reflection->isStatic();
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
         /** @var self<T> $result */
55 55
         $result = \is_object($classOrObject)
56 56
             ? new self(
57
-                path: [$classOrObject::class, $method],
58
-                reflection: $reflection,
59
-                object: $classOrObject,
60
-                delimiter: $isStatic ? '::' : '->',
61
-                callable: [$classOrObject, $method],
57
+                path : [$classOrObject::class, $method],
58
+                reflection : $reflection,
59
+                object : $classOrObject,
60
+                delimiter : $isStatic ? '::' : '->',
61
+                callable : [$classOrObject, $method],
62 62
             )
63 63
             : new self(
64
-                path: [$classOrObject, $method],
65
-                reflection: $reflection,
66
-                delimiter: $isStatic ? '::' : '->',
67
-                callable: [$classOrObject, $method],
64
+                path : [$classOrObject, $method],
65
+                reflection : $reflection,
66
+                delimiter : $isStatic ? '::' : '->',
67
+                callable : [$classOrObject, $method],
68 68
             );
69 69
         return $result;
70 70
     }
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @return ($controller is class-string|T ? self<T> : self<null>)
136 136
      */
137
-    public static function fromPair(string|object $controller, string $action): self
137
+    public static function fromPair(string | object $controller, string $action): self
138 138
     {
139 139
         /** @psalm-suppress ArgumentTypeCoercion */
140
-        if (\is_object($controller) || \method_exists($controller, $action)) {
140
+        if (\is_object($controller) || \method_exists($controller, $action)){
141 141
             /** @var T|class-string<T> $controller */
142 142
             return self::fromReflectionMethod(new \ReflectionMethod($controller, $action), $controller);
143 143
         }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         return $this->object;
169 169
     }
170 170
 
171
-    public function getCallable(): callable|array|null
171
+    public function getCallable(): callable | array | null
172 172
     {
173 173
         return $this->callable;
174 174
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,8 @@
 block discarded – undo
127 127
     public static function fromPair(string|object $controller, string $action): self
128 128
     {
129 129
         /** @psalm-suppress ArgumentTypeCoercion */
130
-        if (\is_object($controller) || \method_exists($controller, $action)) {
130
+        if (\is_object($controller) || \method_exists($controller, $action))
131
+        {
131 132
             /** @var T|class-string<T> $controller */
132 133
             return self::fromReflectionMethod(new \ReflectionMethod($controller, $action), $controller);
133 134
         }
Please login to merge, or discard this patch.