Completed
Pull Request — master (#164)
by
unknown
13:40
created
src/Params/ParamsProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
     {
25 25
         foreach ($this->params as $param) {
26 26
             $validationResult = $param->validate();
27
-            if (!$validationResult->isOk()) {
27
+            if ( ! $validationResult->isOk()) {
28 28
                 $this->errors[$param->getKey()] = $validationResult->getErrors();
29 29
             }
30 30
         }
31
-        return !empty($this->errors);
31
+        return ! empty($this->errors);
32 32
     }
33 33
 
34 34
     /**
Please login to merge, or discard this patch.
src/Component/ApiConsoleControl.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
     /**
128 128
      * @param mixed[] $values
129 129
      * @return mixed[]
130
-    */
130
+     */
131 131
     private function filterFormValues(array $values): array
132 132
     {
133 133
         foreach ($this->handler->params() as $param) {
Please login to merge, or discard this patch.
src/Response/XmlApiResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         return $this->code;
45 45
     }
46 46
 
47
-    public function getExpiration(): DateTimeInterface|false|null
47
+    public function getExpiration(): DateTimeInterface | false | null
48 48
     {
49 49
         return $this->expiration;
50 50
     }
Please login to merge, or discard this patch.
src/Response/JsonApiResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * @return array<mixed>|JsonSerializable
56 56
      */
57
-    public function getPayload(): array|JsonSerializable
57
+    public function getPayload(): array | JsonSerializable
58 58
     {
59 59
         return $this->payload;
60 60
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         return $this->charset;
70 70
     }
71 71
 
72
-    public function getExpiration(): DateTimeInterface|false|null
72
+    public function getExpiration(): DateTimeInterface | false | null
73 73
     {
74 74
         return $this->expiration;
75 75
     }
Please login to merge, or discard this patch.
src/Output/JsonOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
     public function validate(ResponseInterface $response): ValidationResultInterface
24 24
     {
25
-        if (!$response instanceof JsonApiResponse) {
25
+        if ( ! $response instanceof JsonApiResponse) {
26 26
             return new ValidationResult(ValidationResult::STATUS_ERROR);
27 27
         }
28 28
 
Please login to merge, or discard this patch.
src/Output/RedirectOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
     public function validate(ResponseInterface $response): ValidationResultInterface
15 15
     {
16
-        if (!$response instanceof RedirectResponse) {
16
+        if ( ! $response instanceof RedirectResponse) {
17 17
             return new ValidationResult(ValidationResult::STATUS_ERROR);
18 18
         }
19 19
 
Please login to merge, or discard this patch.
src/Authorization/BasicAuthentication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     {
31 31
         $urlScript = $this->httpRequest->getUrl();
32 32
         $authentication = $this->authentications[$urlScript->getUser()] ?? null;
33
-        if (!$authentication) {
33
+        if ( ! $authentication) {
34 34
             return false;
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Component/ApiListingControl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $versionHandlers = [];
51 51
         foreach ($handlers as $handler) {
52 52
             $endPoint = $handler->getEndpoint();
53
-            if (!isset($versionHandlers[$endPoint->getVersion()])) {
53
+            if ( ! isset($versionHandlers[$endPoint->getVersion()])) {
54 54
                 $versionHandlers[$endPoint->getVersion()] = [];
55 55
             }
56 56
 
Please login to merge, or discard this patch.
src/Handlers/OpenApiHandler.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
             'paths' => $this->getPaths($apis, $baseUrl, $basePath),
219 219
         ];
220 220
 
221
-        if (!$securitySchemes) {
221
+        if ( ! $securitySchemes) {
222 222
             unset($data['components']['securitySchemes']);
223 223
         }
224 224
 
225
-        if (!empty($this->definitions)) {
225
+        if ( ! empty($this->definitions)) {
226 226
             $data['components']['schemas'] = array_merge($this->definitions, $data['components']['schemas']);
227 227
         }
228 228
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     private function getApis(string $version): array
241 241
     {
242
-        return array_filter($this->apiDecider->getApis(), function (Api $api) use ($version) {
242
+        return array_filter($this->apiDecider->getApis(), function(Api $api) use ($version) {
243 243
             return $version === $api->getEndpoint()->getVersion();
244 244
         });
245 245
     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             $parameters = $this->createParamsList($handler);
273 273
             $requestBody = $this->createRequestBody($handler);
274 274
 
275
-            if (!empty($parameters) || !empty($requestBody)) {
275
+            if ( ! empty($parameters) || ! empty($requestBody)) {
276 276
                 $responses[IResponse::S400_BAD_REQUEST] = [
277 277
                     'description' => 'Bad request',
278 278
                     'content' => [
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
             $authorization = $api->getAuthorization();
289 289
 
290
-            if (!$authorization instanceof NoAuthorization) {
290
+            if ( ! $authorization instanceof NoAuthorization) {
291 291
                 $responses[IResponse::S401_Unauthorized] = [
292 292
                     'description' => 'Operation forbidden',
293 293
                     'content' => [
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
             foreach ($handler->outputs() as $output) {
315 315
                 if ($output instanceof JsonOutput) {
316 316
                     $schema = $this->transformSchema(json_decode($output->getSchema(), true));
317
-                    if (!isset($responses[$output->getCode()])) {
317
+                    if ( ! isset($responses[$output->getCode()])) {
318 318
                         $responses[$output->getCode()] = [
319 319
                             'description' => $output->getDescription(),
320 320
                             'content' => [
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                                 ],
324 324
                             ],
325 325
                         ];
326
-                        if (!empty($examples = $output->getExamples())) {
326
+                        if ( ! empty($examples = $output->getExamples())) {
327 327
                             if (count($examples) === 1) {
328 328
                                 $example = is_array($output->getExample()) ? $output->getExample() : json_decode($output->getExample(), true);
329 329
                                 /** @phpstan-ignore-next-line */
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                             }
338 338
                         }
339 339
                     } else {
340
-                        if (!isset($responses[$output->getCode()]['content']['application/json; charset=utf-8']['schema']['oneOf'])) {
340
+                        if ( ! isset($responses[$output->getCode()]['content']['application/json; charset=utf-8']['schema']['oneOf'])) {
341 341
                             /** @phpstan-ignore-next-line */
342 342
                             $tmp = $responses[$output->getCode()]['content']['application/json; charset=utf-8']['schema'];
343 343
                             unset($responses[$output->getCode()]['content']['application/json; charset=utf-8']['schema']);
@@ -367,11 +367,11 @@  discard block
 block discarded – undo
367 367
                 }
368 368
             }
369 369
 
370
-            if (!empty($parameters)) {
370
+            if ( ! empty($parameters)) {
371 371
                 $settings['parameters'] = $parameters;
372 372
             }
373 373
 
374
-            if (!empty($requestBody)) {
374
+            if ( ! empty($requestBody)) {
375 375
                 $settings['requestBody'] = $requestBody;
376 376
             }
377 377
 
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
         foreach ($handler->params() as $param) {
510 510
             if ($param instanceof JsonInputParam) {
511 511
                 $schema = json_decode($param->getSchema(), true);
512
-                if (!empty($examples = $param->getExamples())) {
512
+                if ( ! empty($examples = $param->getExamples())) {
513 513
                     if (count($examples) === 1) {
514 514
                         $schema['example'] = is_array($param->getExample()) ? $param->getExample() : json_decode($param->getExample(), true);
515 515
                     } else {
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                 $schema = [
530 530
                     'type' => 'string',
531 531
                 ];
532
-                if (!empty($examples = $param->getExamples())) {
532
+                if ( ! empty($examples = $param->getExamples())) {
533 533
                     if (count($examples) === 1) {
534 534
                         $schema['example'] = $param->getExample();
535 535
                     } else {
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
             }
595 595
         }
596 596
 
597
-        if (!empty($requestBody['properties'])) {
597
+        if ( ! empty($requestBody['properties'])) {
598 598
             $requestBodySchema = [
599 599
                 'type' => 'object',
600 600
                 'properties' => $requestBody['properties'],
Please login to merge, or discard this patch.