Passed
Pull Request — 1.x (#337)
by Akihito
03:54 queued 01:11
created
src/Meta.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $scheme = array_shift($classPath);
59 59
         assert(is_string($scheme));
60 60
 
61
-        return strtolower("{$scheme}://self/" . implode('/', $classPath));
61
+        return strtolower("{$scheme}://self/".implode('/', $classPath));
62 62
     }
63 63
 
64 64
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     private function getOptions(string $class): Options
70 70
     {
71
-        if (! class_exists($class)) {
71
+        if (!class_exists($class)) {
72 72
             throw new LogicException(); // @codeCoverageIgnore
73 73
         }
74 74
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $allows = [];
94 94
         foreach ($methods as $method) {
95
-            $isRequestMethod = str_starts_with($method->name, 'on') && ! str_starts_with($method->name, 'onLink');
96
-            if (! $isRequestMethod) {
95
+            $isRequestMethod = str_starts_with($method->name, 'on') && !str_starts_with($method->name, 'onLink');
96
+            if (!$isRequestMethod) {
97 97
                 continue;
98 98
             }
99 99
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     /** @param ResourceClassName $class */
107 107
     private function getParams(string $class, string $method): Params
108 108
     {
109
-        $refMethod = new ReflectionMethod($class, 'on' . $method);
109
+        $refMethod = new ReflectionMethod($class, 'on'.$method);
110 110
         $parameters = $refMethod->getParameters();
111 111
         $optionalParams = $requiredParams = [];
112 112
         foreach ($parameters as $parameter) {
Please login to merge, or discard this patch.
src/OptionsMethodRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @psalm-suppress RedundantCondition for BC
40 40
      */
41
-    private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string|null
41
+    private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string | null
42 42
     {
43 43
         /** @phpstan-ignore function.alreadyNarrowedType */
44 44
         $hasType = method_exists($parameter, 'getType') && $parameter->getType();
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 $paramDoc[$name]['in'] = $ins[$parameter->name];
65 65
             }
66 66
 
67
-            if (! isset($paramDoc[$parameter->name])) {
67
+            if (!isset($paramDoc[$parameter->name])) {
68 68
                 $paramDoc[$name] = [];
69 69
             }
70 70
 
Please login to merge, or discard this patch.
src/NamedParamMetas.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $method = new ReflectionMethod($callable[0], $callable[1]); // @phpstan-ignore-line
40 40
         $paramMetas = $this->getAttributeParamMetas($method);
41 41
 
42
-        if (! $paramMetas) {
42
+        if (!$paramMetas) {
43 43
             $paramMetas = $this->getAnnotationParamMetas($method);
44 44
         }
45 45
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 $names[$annotation->param] = new AssistedResourceParam($annotation);
122 122
             }
123 123
 
124
-            if (! ($annotation instanceof Assisted)) {
124
+            if (!($annotation instanceof Assisted)) {
125 125
                 continue;
126 126
             }
127 127
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $webcontext = [];
144 144
         foreach ($annotations as $annotation) {
145
-            if (! ($annotation instanceof AbstractWebContextParam)) {
145
+            if (!($annotation instanceof AbstractWebContextParam)) {
146 146
                 continue;
147 147
             }
148 148
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     }
219 219
 
220 220
     /** @psalm-return DefaultParam<mixed>|NoDefaultParam */
221
-    private function getDefault(ReflectionParameter $parameter): DefaultParam|NoDefaultParam
221
+    private function getDefault(ReflectionParameter $parameter): DefaultParam | NoDefaultParam
222 222
     {
223 223
         return $parameter->isDefaultValueAvailable() === true ? new DefaultParam($parameter->getDefaultValue()) : new NoDefaultParam();
224 224
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     private function getParam(ReflectionParameter $parameter): ParamInterface
249 249
     {
250 250
         $type = $parameter->getType();
251
-        if ($type instanceof ReflectionNamedType && ! $type->isBuiltin()) {
251
+        if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
252 252
             return new ClassParam($type, $parameter);
253 253
         }
254 254
 
Please login to merge, or discard this patch.