Passed
Push — master ( f32054...0e8b83 )
by Tarmo
107:11 queued 42:11
created
src/Rest/ResponseHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Rest/ResponseHandler.php
5 5
  *
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             );
101 101
 
102 102
             $groups = array_merge([$entityName], $populate);
103
-            $filter = static fn (string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0;
103
+            $filter = static fn(string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0;
104 104
 
105 105
             if (array_key_exists('populateOnly', $request->query->all())
106 106
                 || count(array_filter($groups, $filter)) > 0
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         if ($populateAll && count($populate) === 0) {
201 201
             $associations = $restResource->getAssociations();
202 202
             $populate = array_map(
203
-                static fn (string $assocName): string => $entityName . '.' . $assocName,
203
+                static fn(string $assocName): string => $entityName . '.' . $assocName,
204 204
                 $associations
205 205
             );
206 206
         }
Please login to merge, or discard this patch.
src/Repository/Traits/RepositoryWrappersTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Repository/Traits/RepositoryWrappersTrait.php
5 5
  *
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         try {
46 46
             $referenceId = UuidHelper::fromString($id);
47 47
         } catch (InvalidUuidStringException $exception) {
48
-            (static fn (Throwable $exception): string => (string)$exception)($exception);
48
+            (static fn(Throwable $exception): string => (string)$exception)($exception);
49 49
 
50 50
             $referenceId = $id;
51 51
         }
Please login to merge, or discard this patch.
src/Utils/JSON.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Utils/JSON.php
5 5
  *
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $options ??= 0;
44 44
         $depth ??= 512;
45 45
 
46
-        $output = json_encode($input, JSON_THROW_ON_ERROR | $options, $depth);
46
+        $output = json_encode($input, JSON_THROW_ON_ERROR|$options, $depth);
47 47
 
48 48
         return (string)$output;
49 49
     }
@@ -70,6 +70,6 @@  discard block
 block discarded – undo
70 70
         $depth ??= 512;
71 71
         $options ??= 0;
72 72
 
73
-        return json_decode($json, $assoc, $depth, JSON_THROW_ON_ERROR | $options);
73
+        return json_decode($json, $assoc, $depth, JSON_THROW_ON_ERROR|$options);
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
src/EventListener/UserEntityEventListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/EventListener/UserEntityEventListener.php
5 5
  *
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
 
96 96
             // Password hash callback
97
-            $callback = fn (string $plainPassword): string => $this->userPasswordEncoder
97
+            $callback = fn(string $plainPassword): string => $this->userPasswordEncoder
98 98
                 ->encodePassword(new SecurityUser($user, []), $plainPassword);
99 99
 
100 100
             // Set new password and encode it with user encoder
Please login to merge, or discard this patch.
src/EventSubscriber/RequestLogSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/EventSubscriber/RequestLogSubscriber.php
5 5
  *
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             || count(
110 110
                 array_filter(
111 111
                     $this->ignoredRoutes,
112
-                    static fn ($route): bool => strpos($route, '/*') !== false
112
+                    static fn($route): bool => strpos($route, '/*') !== false
113 113
                         && strpos($path, substr($route, 0, -2)) !== false
114 114
                 )
115 115
             ) !== 0
Please login to merge, or discard this patch.
src/Resource/ResourceCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Resource/ResourceCollection.php
5 5
  *
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function filter(string $className): Closure
73 73
     {
74
-        return static fn (RestResourceInterface $restResource): bool => $restResource instanceof $className;
74
+        return static fn(RestResourceInterface $restResource): bool => $restResource instanceof $className;
75 75
     }
76 76
 
77 77
     public function error(string $className): void
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             return null;
98 98
         }
99 99
 
100
-        $callback = static fn (RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName;
100
+        $callback = static fn(RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName;
101 101
 
102 102
         $filteredIterator = new CallbackFilterIterator(new IteratorIterator($iterator), $callback);
103 103
         $filteredIterator->rewind();
Please login to merge, or discard this patch.
src/Rest/SearchTerm.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Rest/SearchTerm.php
5 5
  *
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     private static function getTermIterator(array $columns, int $mode): Closure
101 101
     {
102
-        return static fn (string $term): ?array => count($columns) > 0
102
+        return static fn(string $term): ?array => count($columns) > 0
103 103
             ? array_map(self::getColumnIterator($term, $mode), $columns)
104 104
             : null;
105 105
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
          *
117 117
          * @return array<int, string>
118 118
          */
119
-        return static fn (string $column): array => [
119
+        return static fn(string $column): array => [
120 120
             strpos($column, '.') === false ? 'entity.' . $column : $column, 'like', self::getTerm($mode, $term),
121 121
         ];
122 122
     }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         // Normalize column and search parameters
154 154
         return array_filter(
155 155
             array_map('trim', (is_array($column) ? $column : (array)$column)),
156
-            static fn (string $value): bool => trim($value) !== ''
156
+            static fn(string $value) : bool => trim($value) !== ''
157 157
         );
158 158
     }
159 159
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         return array_unique(
172 172
             array_filter(
173 173
                 array_map('trim', (is_array($search) ? $search : explode(' ', (string)$search))),
174
-                static fn (string $value): bool => trim($value) !== ''
174
+                static fn(string $value) : bool => trim($value) !== ''
175 175
             )
176 176
         );
177 177
     }
Please login to merge, or discard this patch.
src/Rest/ControllerCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Rest/ControllerCollection.php
5 5
  *
@@ -50,6 +50,6 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function filter(string $className): Closure
52 52
     {
53
-        return static fn (ControllerInterface $restController): bool => $restController instanceof $className;
53
+        return static fn(ControllerInterface $restController): bool => $restController instanceof $className;
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/DTO/RestDto.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/DTO/RestDto.php
5 5
  *
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function getVisited(): array
72 72
     {
73
-        return array_filter($this->visited, static fn (string $property): bool => $property !== 'id');
73
+        return array_filter($this->visited, static fn(string $property): bool => $property !== 'id');
74 74
     }
75 75
 
76 76
     public function setVisited(string $property): RestDtoInterface
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             'has' . ucfirst($property),
145 145
         ];
146 146
 
147
-        $getterMethods = array_filter($getters, static fn (string $method): bool => method_exists($dto, $method));
147
+        $getterMethods = array_filter($getters, static fn(string $method): bool => method_exists($dto, $method));
148 148
 
149 149
         return $this->validateGetterMethod($property, $getterMethods);
150 150
     }
Please login to merge, or discard this patch.