Completed
Push — master ( 9d6293...1b9c64 )
by Tarmo
18s queued 13s
created
src/Entity/Traits/UserRelations.php 1 patch
Spacing   +9 added lines, -9 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/Entity/Traits/UserRelations.php
5 5
  *
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     #[Groups([
40 40
         'User.userGroups',
41 41
     ])]
42
-    protected Collection | ArrayCollection $userGroups;
42
+    protected Collection|ArrayCollection $userGroups;
43 43
 
44 44
     /**
45 45
      * @var Collection<int, LogRequest>|ArrayCollection<int, LogRequest>
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     #[Groups([
52 52
         'User.logsRequest',
53 53
     ])]
54
-    protected Collection | ArrayCollection $logsRequest;
54
+    protected Collection|ArrayCollection $logsRequest;
55 55
 
56 56
     /**
57 57
      * @var Collection<int, LogLogin>|ArrayCollection<int, LogLogin>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     #[Groups([
64 64
         'User.logsLogin',
65 65
     ])]
66
-    protected Collection | ArrayCollection $logsLogin;
66
+    protected Collection|ArrayCollection $logsLogin;
67 67
 
68 68
     /**
69 69
      * @var Collection<int, LogLoginFailure>|ArrayCollection<int, LogLoginFailure>
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     #[Groups([
76 76
         'User.logsLoginFailure',
77 77
     ])]
78
-    protected Collection | ArrayCollection $logsLoginFailure;
78
+    protected Collection|ArrayCollection $logsLoginFailure;
79 79
 
80 80
     /**
81 81
      * Getter for roles.
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @return Collection<int, UserGroup>|ArrayCollection<int, UserGroup>
107 107
      */
108
-    public function getUserGroups(): Collection | ArrayCollection
108
+    public function getUserGroups(): Collection|ArrayCollection
109 109
     {
110 110
         return $this->userGroups;
111 111
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @return Collection<int, LogRequest>|ArrayCollection<int, LogRequest>
117 117
      */
118
-    public function getLogsRequest(): Collection | ArrayCollection
118
+    public function getLogsRequest(): Collection|ArrayCollection
119 119
     {
120 120
         return $this->logsRequest;
121 121
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @return Collection<int, LogLogin>|ArrayCollection<int, LogLogin>
127 127
      */
128
-    public function getLogsLogin(): Collection | ArrayCollection
128
+    public function getLogsLogin(): Collection|ArrayCollection
129 129
     {
130 130
         return $this->logsLogin;
131 131
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      *
136 136
      * @return Collection<int, LogLoginFailure>|ArrayCollection<int, LogLoginFailure>
137 137
      */
138
-    public function getLogsLoginFailure(): Collection | ArrayCollection
138
+    public function getLogsLoginFailure(): Collection|ArrayCollection
139 139
     {
140 140
         return $this->logsLoginFailure;
141 141
     }
Please login to merge, or discard this patch.
src/Entity/ApiKey.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/Entity/ApiKey.php
5 5
  *
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     #[Groups([
116 116
         'ApiKey.userGroups',
117 117
     ])]
118
-    private Collection | ArrayCollection $userGroups;
118
+    private Collection|ArrayCollection $userGroups;
119 119
 
120 120
     /**
121 121
      * @var Collection<int, LogRequest>|ArrayCollection<int, LogRequest>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     #[Groups([
128 128
         'ApiKey.logsRequest',
129 129
     ])]
130
-    private Collection | ArrayCollection $logsRequest;
130
+    private Collection|ArrayCollection $logsRequest;
131 131
 
132 132
     /**
133 133
      * ApiKey constructor.
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      *
186 186
      * @return Collection<int, UserGroup>|ArrayCollection<int, UserGroup>
187 187
      */
188
-    public function getUserGroups(): Collection | ArrayCollection
188
+    public function getUserGroups(): Collection|ArrayCollection
189 189
     {
190 190
         return $this->userGroups;
191 191
     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @return Collection<int, LogRequest>|ArrayCollection<int, LogRequest>
197 197
      */
198
-    public function getLogsRequest(): Collection | ArrayCollection
198
+    public function getLogsRequest(): Collection|ArrayCollection
199 199
     {
200 200
         return $this->logsRequest;
201 201
     }
Please login to merge, or discard this patch.
src/Decorator/StopwatchDecorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 /**
4 4
  * /src/Decorator/StopwatchDecorator.php
5 5
  *
Please login to merge, or discard this patch.
src/Rest/SearchTerm.php 1 patch
Spacing   +10 added lines, -10 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
  *
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 final class SearchTerm implements SearchTermInterface
34 34
 {
35 35
     public static function getCriteria(
36
-        array | string | null $column,
37
-        array | string | null $search,
36
+        array|string|null $column,
37
+        array|string|null $search,
38 38
         ?string $operand = null,
39 39
         ?int $mode = null,
40 40
     ): ?array {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      *
134 134
      * @return array<int, string>
135 135
      */
136
-    private static function getColumns(array | string | null $column): array
136
+    private static function getColumns(array|string|null $column): array
137 137
     {
138 138
         // Normalize columns
139 139
         return $column === null
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
                 array_map(
143 143
                     'trim',
144 144
                     (is_array($column)
145
-                        ? array_filter($column, static fn (string | null $column): bool => is_string($column))
145
+                        ? array_filter($column, static fn (string|null $column) : bool => is_string($column))
146 146
                         : (array)$column),
147 147
                 ),
148
-                static fn (string $value): bool => trim($value) !== '',
148
+                static fn (string $value) : bool => trim($value) !== '',
149 149
             );
150 150
     }
151 151
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      *
157 157
      * @return array<int, string>
158 158
      */
159
-    private static function getSearchTerms(array | string | null $search): array
159
+    private static function getSearchTerms(array|string|null $search): array
160 160
     {
161 161
         if (is_string($search)) {
162 162
             preg_match_all('#([^\"]\S*|\".+?\")\s*#', trim($search), $matches);
@@ -174,15 +174,15 @@  discard block
 block discarded – undo
174 174
             : array_unique(
175 175
                 array_filter(
176 176
                     array_map(
177
-                        static fn (string $term): string => (string)preg_replace('#\s+#', ' ', $term),
177
+                        static fn (string $term) : string => (string)preg_replace('#\s+#', ' ', $term),
178 178
                         array_map(
179 179
                             'trim',
180 180
                             (is_array($search)
181
-                                ? array_filter($search, static fn (string | null $term): bool => is_string($term))
181
+                                ? array_filter($search, static fn (string|null $term) : bool => is_string($term))
182 182
                                 : explode(' ', $search)),
183 183
                         ),
184 184
                     ),
185
-                    static fn (string $value): bool => trim($value) !== ''
185
+                    static fn (string $value) : bool => trim($value) !== ''
186 186
                 )
187 187
             );
188 188
     }
Please login to merge, or discard this patch.
src/Rest/RepositoryHelper.php 1 patch
Spacing   +4 added lines, -4 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/RepositoryHelper.php
5 5
  *
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     private static function processExpression(QueryBuilder $queryBuilder, Composite $expression, array $criteria): void
251 251
     {
252
-        $iterator = static function (array $comparison, string | int $key) use ($queryBuilder, $expression): void {
252
+        $iterator = static function (array $comparison, string|int $key) use ($queryBuilder, $expression): void {
253 253
             $expressionAnd = ($key === 'and' || array_key_exists('and', $comparison));
254 254
             $expressionOr = ($key === 'or' || array_key_exists('or', $comparison));
255 255
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      *
294 294
      * @return array{0: string, 1: string, 2: string|array<int, string>}
295 295
      */
296
-    private static function createCriteria(string $column, string | array $value): array
296
+    private static function createCriteria(string $column, string|array $value): array
297 297
     {
298 298
         if (!str_contains($column, '.')) {
299 299
             $column = 'entity.' . $column;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
      */
380 380
     private static function getIterator(array &$condition): Closure
381 381
     {
382
-        return static function (string | array $value, string $column) use (&$condition): void {
382
+        return static function (string|array $value, string $column) use (&$condition): void {
383 383
             // If criteria contains 'and' OR 'or' key(s) assume that array in only in the right format
384 384
             if (strcmp($column, 'and') === 0 || strcmp($column, 'or') === 0) {
385 385
                 $condition[$column] = $value;
Please login to merge, or discard this patch.
src/Rest/RequestHandler.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/RequestHandler.php
5 5
  *
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             $searchTerms = JSON::decode($search, true);
217 217
 
218 218
             self::checkSearchTerms($searchTerms);
219
-        } catch (JsonException | LogicException) {
219
+        } catch (JsonException|LogicException) {
220 220
             $searchTerms = null;
221 221
         }
222 222
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     private static function getIterator(array &$output): Closure
264 264
     {
265
-        return static function (string $value, string | int $key) use (&$output): void {
265
+        return static function (string $value, string|int $key) use (&$output): void {
266 266
             $order = in_array(mb_strtoupper($value), ['ASC', 'DESC'], true) ? mb_strtoupper($value) : 'ASC';
267 267
             $column = is_string($key) ? $key : $value;
268 268
 
Please login to merge, or discard this patch.
src/EventSubscriber/LockedUserSubscriber.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/LockedUserSubscriber.php
5 5
  *
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     /**
98 98
      * @throws Throwable
99 99
      */
100
-    private function getUser(string | object $user): ?User
100
+    private function getUser(string|object $user): ?User
101 101
     {
102 102
         return match (true) {
103 103
             is_string($user) => $this->userRepository->loadUserByIdentifier($user, false),
Please login to merge, or discard this patch.
src/EventSubscriber/RequestLogSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
  *
Please login to merge, or discard this patch.
src/Security/UserTypeIdentification.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/Security/UserTypeIdentification.php
5 5
  *
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * object implementing a __toString method, or the username as a regular
89 89
      * string.
90 90
      */
91
-    private function getUserToken(): UserInterface | null
91
+    private function getUserToken(): UserInterface|null
92 92
     {
93 93
         $token = $this->tokenStorage->getToken();
94 94
 
Please login to merge, or discard this patch.