Passed
Pull Request — 1.x (#343)
by Akihito
17:22 queued 15:35
created
src/AbstractRequest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
         public array $query = [],
93 93
         // phpcs:ignore SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
94 94
         public array $links = [],
95
-        private readonly LinkerInterface|null $linker = null,
95
+        private readonly LinkerInterface | null $linker = null,
96 96
     ) {
97
-        if (! in_array(strtolower($method), ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'], true)) {
97
+        if (!in_array(strtolower($method), ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'], true)) {
98 98
             throw new MethodException($method, 400);
99 99
         }
100 100
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
             return (string) $this->result;
112 112
         } catch (Throwable $e) {
113
-            trigger_error($e->getMessage() . PHP_EOL . $e->getTraceAsString(), E_USER_ERROR);
113
+            trigger_error($e->getMessage().PHP_EOL.$e->getTraceAsString(), E_USER_ERROR);
114 114
 
115 115
             /** @noinspection PhpUnreachableStatementInspection */
116 116
             return ''; // @phpstan-ignore-line
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @psalm-taint-source input $query
126 126
      */
127 127
     #[Override]
128
-    public function __invoke(array|null $query = null): ResourceObject
128
+    public function __invoke(array | null $query = null): ResourceObject
129 129
     {
130 130
         if (is_array($query)) {
131 131
             $this->query = array_merge($this->query, $query);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     #[ReturnTypeWillChange]
163 163
     public function offsetSet($offset, $value)
164 164
     {
165
-        throw new OutOfBoundsException(__METHOD__ . ' is unavailable.', 400);
165
+        throw new OutOfBoundsException(__METHOD__.' is unavailable.', 400);
166 166
     }
167 167
 
168 168
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     {
181 181
         unset($offset);
182 182
 
183
-        throw new OutOfBoundsException(__METHOD__ . ' is unavailable.', 400);
183
+        throw new OutOfBoundsException(__METHOD__.' is unavailable.', 400);
184 184
     }
185 185
 
186 186
     /**
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
     {
214 214
         $this->invoke();
215 215
         assert($this->result instanceof ResourceObject);
216
-        if (! is_array($this->result->body) || ! array_key_exists($offset, $this->result->body)) {
217
-            throw new OutOfBoundsException("[{$offset}] for object[" . $this->result::class . ']', 400);
216
+        if (!is_array($this->result->body) || !array_key_exists($offset, $this->result->body)) {
217
+            throw new OutOfBoundsException("[{$offset}] for object[".$this->result::class.']', 400);
218 218
         }
219 219
 
220 220
         return $this->result->body[$offset];
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     #[Override]
255 255
     public function hash(): string
256 256
     {
257
-        return md5($this->resourceObject::class . $this->method . serialize($this->query) . serialize($this->links));
257
+        return md5($this->resourceObject::class.$this->method.serialize($this->query).serialize($this->links));
258 258
     }
259 259
 
260 260
     /**
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      */
267 267
     public function __serialize()
268 268
     {
269
-        throw new LogicException(__METHOD__ . ' not supported');
269
+        throw new LogicException(__METHOD__.' not supported');
270 270
     }
271 271
 
272 272
     /**
Please login to merge, or discard this patch.
src/InputFormParam.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
      * @psalm-taint-source input
42 42
      */
43 43
     #[Override]
44
-    public function __invoke(string $varName, array $query, InjectorInterface $injector): AbstractFileUpload|null
44
+    public function __invoke(string $varName, array $query, InjectorInterface $injector): AbstractFileUpload | null
45 45
     {
46 46
         // When user sets the FileUpload object, return it directly
47 47
         if (array_key_exists($varName, $query)) {
48 48
             $value = $query[$varName];
49 49
             // Type check: ensure the value is a valid file upload object or null
50
-            if ($value !== null && ! ($value instanceof FileUpload) && ! ($value instanceof ErrorFileUpload)) {
50
+            if ($value !== null && !($value instanceof FileUpload) && !($value instanceof ErrorFileUpload)) {
51 51
                 throw new InvalidArgumentException($varName);
52 52
             }
53 53
 
Please login to merge, or discard this patch.