Passed
Push — master ( 627661...b4b706 )
by Petr
02:55
created
php-src/Converters/ObjectConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * @param array<TK, TVal>|Traversable<TK, TVal>|stdClass $data
34 34
      * @return array<TK, TVal>
35 35
      */
36
-    protected function parseObjects(array|object $data): array
36
+    protected function parseObjects(array | object $data): array
37 37
     {
38 38
         if ($data instanceof Traversable) {
39 39
             $data = iterator_to_array($data);
Please login to merge, or discard this patch.
php-src/Converters/DateTimeConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * @param array<TK, TVal>|Traversable<TK, TVal>|string|int|object $array
42 42
      * @return array<string, mixed>|string
43 43
      */
44
-    private function parseDateTimeToString(mixed $array): array|string
44
+    private function parseDateTimeToString(mixed $array): array | string
45 45
     {
46 46
         if (!is_array($array)) {
47 47
             if ($array instanceof DateTime || interface_exists('DateTimeInterface') && $array instanceof DateTimeInterface) {
Please login to merge, or discard this patch.
php-src/Application/RouteListFactory.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,7 @@
 block discarded – undo
132 132
                 $action = Strings::firstLower($action);
133 133
 
134 134
                 $pattern = $this->prefix ?
135
-                    $this->prefix . '/' . $mask :
136
-                    $mask;
135
+                    $this->prefix . '/' . $mask : $mask;
137 136
 
138 137
                 $routeData[strval($pattern)][strval($requestMethod)] = $action;
139 138
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,8 +123,9 @@
 block discarded – undo
123 123
         $routeData = [];
124 124
         foreach ($methods as $method) {
125 125
             // Parse annotations only on action methods
126
-            if (!str_contains($method->getName(), 'action'))
127
-                continue;
126
+            if (!str_contains($method->getName(), 'action')) {
127
+                            continue;
128
+            }
128 129
 
129 130
             $annotations = $this->routeAnnotation->parse($method);
130 131
             foreach ($annotations as $requestMethod => $mask) {
Please login to merge, or discard this patch.
php-src/Application/ResponseFactory.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,9 @@
 block discarded – undo
169 169
             return $acceptableTypes[0];
170 170
         }
171 171
         foreach ($accept as $mimeType) {
172
-            if ('*/*' === $mimeType) return $acceptableTypes[0];
172
+            if ('*/*' === $mimeType) {
173
+                return $acceptableTypes[0];
174
+            }
173 175
             foreach ($acceptableTypes as $formatMime) {
174 176
                 if (empty($formatMime)) {
175 177
                     continue;
Please login to merge, or discard this patch.
php-src/Application/MethodOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     ];
32 32
 
33 33
     public function __construct(
34
-        private readonly Router|RouteList $router,
34
+        private readonly Router | RouteList $router,
35 35
     )
36 36
     {
37 37
     }
Please login to merge, or discard this patch.
php-src/Application/Responses/NullResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         return null;
20 20
     }
21 21
 
22
-    public function getData(): iterable|stdClass|string
22
+    public function getData(): iterable | stdClass | string
23 23
     {
24 24
         return '';
25 25
     }
Please login to merge, or discard this patch.
php-src/Application/Responses/IResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
     /**
19 19
      * @return iterable<string|int, mixed>|stdClass|string
20 20
      */
21
-    public function getData(): iterable|stdClass|string;
21
+    public function getData(): iterable | stdClass | string;
22 22
 }
Please login to merge, or discard this patch.
php-src/Application/Responses/BaseResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * @var iterable<string|int, mixed>|stdClass
19 19
      */
20
-    protected iterable|stdClass $data = [];
20
+    protected iterable | stdClass $data = [];
21 21
 
22 22
     private bool $prettyPrint = true;
23 23
 
24 24
     public function __construct(
25 25
         protected IMapper              $mapper,
26
-        protected readonly string|null $contentType = null,
26
+        protected readonly string | null $contentType = null,
27 27
     )
28 28
     {
29 29
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * Get response data
58 58
      * @return iterable<string|int, mixed>|stdClass|string
59 59
      */
60
-    public function getData(): iterable|stdClass|string
60
+    public function getData(): iterable | stdClass | string
61 61
     {
62 62
         return $this->data;
63 63
     }
Please login to merge, or discard this patch.
php-src/Application/Responses/ErrorResponse.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,4 +54,4 @@
 block discarded – undo
54 54
         $this->response->send($httpRequest, $httpResponse);
55 55
     }
56 56
 }
57
- 
58 57
\ No newline at end of file
58
+    
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      * Get response data
25 25
      * @return iterable<string|int, mixed>|stdClass|string
26 26
      */
27
-    public function getData(): iterable|stdClass|string
27
+    public function getData(): iterable | stdClass | string
28 28
     {
29 29
         return $this->response->getData();
30 30
     }
Please login to merge, or discard this patch.