@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Entity/UserGroup.php |
5 | 5 | * |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | #[Groups([ |
124 | 124 | 'UserGroup.users', |
125 | 125 | ])] |
126 | - private Collection | ArrayCollection $users; |
|
126 | + private Collection|ArrayCollection $users; |
|
127 | 127 | |
128 | 128 | /** |
129 | 129 | * @var Collection<int, ApiKey>|ArrayCollection<int, ApiKey> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | #[Groups([ |
140 | 140 | 'UserGroup.apiKeys', |
141 | 141 | ])] |
142 | - private Collection | ArrayCollection $apiKeys; |
|
142 | + private Collection|ArrayCollection $apiKeys; |
|
143 | 143 | |
144 | 144 | public function __construct() |
145 | 145 | { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * @return Collection<int, User>|ArrayCollection<int, User> |
188 | 188 | */ |
189 | - public function getUsers(): Collection | ArrayCollection |
|
189 | + public function getUsers(): Collection|ArrayCollection |
|
190 | 190 | { |
191 | 191 | return $this->users; |
192 | 192 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | /** |
195 | 195 | * @return Collection<int, ApiKey>|ArrayCollection<int, ApiKey> |
196 | 196 | */ |
197 | - public function getApiKeys(): Collection | ArrayCollection |
|
197 | + public function getApiKeys(): Collection|ArrayCollection |
|
198 | 198 | { |
199 | 199 | return $this->apiKeys; |
200 | 200 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Entity/Role.php |
5 | 5 | * |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | #[Groups([ |
83 | 83 | 'Role.userGroups', |
84 | 84 | ])] |
85 | - private Collection | ArrayCollection $userGroups; |
|
85 | + private Collection|ArrayCollection $userGroups; |
|
86 | 86 | |
87 | 87 | public function __construct(string $role) |
88 | 88 | { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /** |
111 | 111 | * @return Collection<int, UserGroup>|ArrayCollection<int, UserGroup> |
112 | 112 | */ |
113 | - public function getUserGroups(): Collection | ArrayCollection |
|
113 | + public function getUserGroups(): Collection|ArrayCollection |
|
114 | 114 | { |
115 | 115 | return $this->userGroups; |
116 | 116 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Entity/ApiKey.php |
5 | 5 | * |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | #[Groups([ |
115 | 115 | 'ApiKey.userGroups', |
116 | 116 | ])] |
117 | - private Collection | ArrayCollection $userGroups; |
|
117 | + private Collection|ArrayCollection $userGroups; |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * @var Collection<int, LogRequest>|ArrayCollection<int, LogRequest> |
@@ -127,7 +127,7 @@ discard block |
||
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. |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @return Collection<int, UserGroup>|ArrayCollection<int, UserGroup> |
195 | 195 | */ |
196 | - public function getUserGroups(): Collection | ArrayCollection |
|
196 | + public function getUserGroups(): Collection|ArrayCollection |
|
197 | 197 | { |
198 | 198 | return $this->userGroups; |
199 | 199 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | * |
204 | 204 | * @return Collection<int, LogRequest>|ArrayCollection<int, LogRequest> |
205 | 205 | */ |
206 | - public function getLogsRequest(): Collection | ArrayCollection |
|
206 | + public function getLogsRequest(): Collection|ArrayCollection |
|
207 | 207 | { |
208 | 208 | return $this->logsRequest; |
209 | 209 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | array_merge( |
226 | 226 | [RolesService::ROLE_API], |
227 | 227 | $this->userGroups |
228 | - ->map(static fn (UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
228 | + ->map(static fn(UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
229 | 229 | ->toArray(), |
230 | 230 | ), |
231 | 231 | ), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/AutoMapper/ApiKey/RequestMapper.php |
5 | 5 | * |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | protected function transformUserGroups(array $userGroups): array |
48 | 48 | { |
49 | 49 | return array_map( |
50 | - fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
50 | + fn(string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
51 | 51 | $userGroups, |
52 | 52 | ); |
53 | 53 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/AutoMapper/User/RequestMapper.php |
5 | 5 | * |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | protected function transformUserGroups(array $userGroups): array |
53 | 53 | { |
54 | 54 | return array_map( |
55 | - fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
55 | + fn(string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
56 | 56 | $userGroups, |
57 | 57 | ); |
58 | 58 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Entity/Traits/UserRelations.php |
5 | 5 | * |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | #[Groups([ |
41 | 41 | 'User.userGroups', |
42 | 42 | ])] |
43 | - protected Collection | ArrayCollection $userGroups; |
|
43 | + protected Collection|ArrayCollection $userGroups; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @var Collection<int, LogRequest>|ArrayCollection<int, LogRequest> |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | #[Groups([ |
54 | 54 | 'User.logsRequest', |
55 | 55 | ])] |
56 | - protected Collection | ArrayCollection $logsRequest; |
|
56 | + protected Collection|ArrayCollection $logsRequest; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @var Collection<int, LogLogin>|ArrayCollection<int, LogLogin> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | #[Groups([ |
67 | 67 | 'User.logsLogin', |
68 | 68 | ])] |
69 | - protected Collection | ArrayCollection $logsLogin; |
|
69 | + protected Collection|ArrayCollection $logsLogin; |
|
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @var Collection<int, LogLoginFailure>|ArrayCollection<int, LogLoginFailure> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | #[Groups([ |
80 | 80 | 'User.logsLoginFailure', |
81 | 81 | ])] |
82 | - protected Collection | ArrayCollection $logsLoginFailure; |
|
82 | + protected Collection|ArrayCollection $logsLoginFailure; |
|
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Getter for roles. |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function getRoles(): array |
101 | 101 | { |
102 | 102 | return $this->userGroups |
103 | - ->map(static fn (UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
103 | + ->map(static fn(UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
104 | 104 | ->toArray(); |
105 | 105 | } |
106 | 106 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * |
110 | 110 | * @return Collection<int, UserGroup>|ArrayCollection<int, UserGroup> |
111 | 111 | */ |
112 | - public function getUserGroups(): Collection | ArrayCollection |
|
112 | + public function getUserGroups(): Collection|ArrayCollection |
|
113 | 113 | { |
114 | 114 | return $this->userGroups; |
115 | 115 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @return Collection<int, LogRequest>|ArrayCollection<int, LogRequest> |
121 | 121 | */ |
122 | - public function getLogsRequest(): Collection | ArrayCollection |
|
122 | + public function getLogsRequest(): Collection|ArrayCollection |
|
123 | 123 | { |
124 | 124 | return $this->logsRequest; |
125 | 125 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return Collection<int, LogLogin>|ArrayCollection<int, LogLogin> |
131 | 131 | */ |
132 | - public function getLogsLogin(): Collection | ArrayCollection |
|
132 | + public function getLogsLogin(): Collection|ArrayCollection |
|
133 | 133 | { |
134 | 134 | return $this->logsLogin; |
135 | 135 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * |
140 | 140 | * @return Collection<int, LogLoginFailure>|ArrayCollection<int, LogLoginFailure> |
141 | 141 | */ |
142 | - public function getLogsLoginFailure(): Collection | ArrayCollection |
|
142 | + public function getLogsLoginFailure(): Collection|ArrayCollection |
|
143 | 143 | { |
144 | 144 | return $this->logsLoginFailure; |
145 | 145 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Rest/ResponseHandler.php |
5 | 5 | * |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ); |
85 | 85 | |
86 | 86 | $groups = array_merge([$entityName], $populate); |
87 | - $filter = static fn (string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0; |
|
87 | + $filter = static fn(string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0; |
|
88 | 88 | |
89 | 89 | if (array_key_exists('populateOnly', $request->query->all()) |
90 | 90 | || !empty(array_filter($groups, $filter)) |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | /** @var FormError $error */ |
129 | 129 | foreach ($form->getErrors(true) as $error) { |
130 | - $name = $error->getOrigin()?->getName() ?? ''; |
|
130 | + $name = $error->getOrigin() ? ->getName() ?? ''; |
|
131 | 131 | |
132 | 132 | $errors[] = sprintf( |
133 | 133 | 'Field \'%s\': %s', |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | if ($populateAll && empty($populate)) { |
163 | 163 | $associations = $restResource->getAssociations(); |
164 | 164 | $populate = array_map( |
165 | - static fn (string $assocName): string => $entityName . '.' . $assocName, |
|
165 | + static fn(string $assocName): string => $entityName . '.' . $assocName, |
|
166 | 166 | $associations, |
167 | 167 | ); |
168 | 168 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Form/DataTransformer/UserGroupTransformer.php |
5 | 5 | * |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function transform($value): array |
46 | 46 | { |
47 | - $callback = static fn (UserGroup | Stringable $userGroup): string => |
|
47 | + $callback = static fn(UserGroup|Stringable $userGroup): string => |
|
48 | 48 | $userGroup instanceof UserGroup ? $userGroup->getId() : (string)$userGroup; |
49 | 49 | |
50 | 50 | return is_array($value) ? array_map($callback, $value) : []; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | return is_array($value) |
67 | 67 | ? array_map( |
68 | - fn (string $groupId): UserGroup => $this->resource->findOne($groupId, false) ?? |
|
68 | + fn(string $groupId) : UserGroup => $this->resource->findOne($groupId, false) ?? |
|
69 | 69 | throw new TransformationFailedException( |
70 | 70 | sprintf('User group with id "%s" does not exist!', $groupId), |
71 | 71 | ), |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Compiler/StopwatchCompilerPass.php |
5 | 5 | * |