Passed
Pull Request — master (#1299)
by Tarmo
07:08
created
src/Command/ApiKey/ListApiKeysCommand.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/Command/ApiKey/ListApiKeysCommand.php
5 5
  *
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
      */
83 83
     private function getFormatterApiKey(): Closure
84 84
     {
85
-        $userGroupFormatter = static fn (UserGroup $userGroup): string => sprintf(
85
+        $userGroupFormatter = static fn(UserGroup $userGroup): string => sprintf(
86 86
             '%s (%s)',
87 87
             $userGroup->getName(),
88 88
             $userGroup->getRole()->getId(),
89 89
         );
90 90
 
91
-        return fn (ApiKey $apiToken): array => [
91
+        return fn(ApiKey $apiToken): array => [
92 92
             $apiToken->getId(),
93 93
             $apiToken->getToken(),
94 94
             $apiToken->getDescription(),
Please login to merge, or discard this patch.
src/Command/User/ListUserGroupsCommand.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/Command/User/ListUserGroupsCommand.php
5 5
  *
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
      */
81 81
     private function getFormatterUserGroup(): Closure
82 82
     {
83
-        $userFormatter = static fn (User $user): string => sprintf(
83
+        $userFormatter = static fn(User $user): string => sprintf(
84 84
             '%s %s <%s>',
85 85
             $user->getFirstName(),
86 86
             $user->getLastName(),
87 87
             $user->getEmail(),
88 88
         );
89 89
 
90
-        return static fn (UserGroup $userGroup): array => [
90
+        return static fn(UserGroup $userGroup): array => [
91 91
             $userGroup->getId(),
92 92
             $userGroup->getName(),
93 93
             $userGroup->getRole()->getId(),
Please login to merge, or discard this patch.
src/Command/User/ListUsersCommand.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/Command/User/ListUsersCommand.php
5 5
  *
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
      */
85 85
     private function getFormatterUser(): Closure
86 86
     {
87
-        $userGroupFormatter = static fn (UserGroup $userGroup): string => sprintf(
87
+        $userGroupFormatter = static fn(UserGroup $userGroup): string => sprintf(
88 88
             '%s (%s)',
89 89
             $userGroup->getName(),
90 90
             $userGroup->getRole()->getId(),
91 91
         );
92 92
 
93
-        return fn (User $user): array => [
93
+        return fn(User $user): array => [
94 94
             $user->getId(),
95 95
             $user->getUsername(),
96 96
             $user->getEmail(),
Please login to merge, or discard this patch.
src/Command/User/CreateRolesCommand.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/Command/User/CreateRolesCommand.php
5 5
  *
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $created = array_sum(
55 55
             array_map(
56
-                fn (string $role): int => $this->createRole($role),
56
+                fn(string $role): int => $this->createRole($role),
57 57
                 $this->rolesService->getRoles(),
58 58
             ),
59 59
         );
Please login to merge, or discard this patch.
src/Command/Utils/CreateDateDimensionEntitiesCommand.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/Command/Utils/CreateDateDimensionEntitiesCommand.php
5 5
  *
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     private function validatorYearStart(): Closure
176 176
     {
177
-        return static fn (int $year): int => ($year < self::YEAR_MIN || $year > self::YEAR_MAX)
177
+        return static fn(int $year): int => ($year < self::YEAR_MIN || $year > self::YEAR_MAX)
178 178
             ? throw new InvalidArgumentException(
179 179
                 sprintf(
180 180
                     'Start year must be between %d and %d',
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     private function validatorYearEnd(int $yearStart): Closure
194 194
     {
195
-        return static fn (int $year): int => ($year < self::YEAR_MIN || $year > self::YEAR_MAX || $year < $yearStart)
195
+        return static fn(int $year): int => ($year < self::YEAR_MIN || $year > self::YEAR_MAX || $year < $yearStart)
196 196
             ? throw new InvalidArgumentException(
197 197
                 sprintf(
198 198
                     'End year must be between %d and %d and after given start year %d',
Please login to merge, or discard this patch.
src/DTO/User/User.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/DTO/User/User.php
5 5
  *
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         $entity->clearUserGroups();
287 287
 
288 288
         array_map(
289
-            static fn (UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
289
+            static fn(UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
290 290
             $value,
291 291
         );
292 292
 
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): self
@@ -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.
src/DTO/Traits/PatchUserGroups.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/DTO/Traits/PatchUserGroups.php
5 5
  *
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     protected function updateUserGroups(UserGroupAwareInterface $entity, array $value): self
29 29
     {
30 30
         array_map(
31
-            static fn (UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
31
+            static fn(UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
32 32
             $value,
33 33
         );
34 34
 
Please login to merge, or discard this patch.
src/DTO/ApiKey/ApiKey.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/DTO/ApiKey/ApiKey.php
5 5
  *
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $entity->clearUserGroups();
129 129
 
130 130
         array_map(
131
-            static fn (UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
131
+            static fn(UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup),
132 132
             $value,
133 133
         );
134 134
 
Please login to merge, or discard this patch.