@@ -50,7 +50,7 @@ |
||
50 | 50 | $roles = [RolesService::ROLE_API]; |
51 | 51 | |
52 | 52 | // Iterate API key user groups and attach those roles for API user |
53 | - $this->apiKey->getUserGroups()->map(function (UserGroup $userGroup) use (&$roles) { |
|
53 | + $this->apiKey->getUserGroups()->map(function(UserGroup $userGroup) use (&$roles) { |
|
54 | 54 | $roles[] = $userGroup->getRole()->getId(); |
55 | 55 | }); |
56 | 56 |
@@ -103,7 +103,7 @@ |
||
103 | 103 | * |
104 | 104 | * @return bool |
105 | 105 | */ |
106 | - $filter = function (UserProviderInterface $userProvider): bool { |
|
106 | + $filter = function(UserProviderInterface $userProvider): bool { |
|
107 | 107 | return $userProvider instanceof ApiKeyUserProvider; |
108 | 108 | }; |
109 | 109 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | 'has' . \ucfirst($property), |
66 | 66 | ]; |
67 | 67 | |
68 | - $filter = function (string $method) use ($dto): bool { |
|
68 | + $filter = function(string $method) use ($dto): bool { |
|
69 | 69 | return \method_exists($dto, $method); |
70 | 70 | }; |
71 | 71 |
@@ -145,7 +145,7 @@ |
||
145 | 145 | * |
146 | 146 | * @return string |
147 | 147 | */ |
148 | - $iterator = function (UserGroupEntity $userGroup) { |
|
148 | + $iterator = function(UserGroupEntity $userGroup) { |
|
149 | 149 | return $userGroup->getId(); |
150 | 150 | }; |
151 | 151 |
@@ -252,7 +252,7 @@ |
||
252 | 252 | * |
253 | 253 | * @return string |
254 | 254 | */ |
255 | - $iterator = function (UserGroupEntity $group) { |
|
255 | + $iterator = function(UserGroupEntity $group) { |
|
256 | 256 | return $group->getId(); |
257 | 257 | }; |
258 | 258 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * |
80 | 80 | * @return bool |
81 | 81 | */ |
82 | - $filter = function (Entity $user) use ($userGroup): bool { |
|
82 | + $filter = function(Entity $user) use ($userGroup): bool { |
|
83 | 83 | $user->setRolesService($this->roles); |
84 | 84 | |
85 | 85 | return \in_array($userGroup->getRole()->getId(), $user->getRoles(), true); |
@@ -38,11 +38,11 @@ |
||
38 | 38 | */ |
39 | 39 | public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string |
40 | 40 | { |
41 | - $iterator = function (string $value): string { |
|
41 | + $iterator = function(string $value): string { |
|
42 | 42 | return "'" . $value . "'"; |
43 | 43 | }; |
44 | 44 | |
45 | - return 'ENUM(' . \implode(', ', \array_map($iterator, static::$values)). ')'; |
|
45 | + return 'ENUM(' . \implode(', ', \array_map($iterator, static::$values)) . ')'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -131,7 +131,7 @@ |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if ($response->getStatusCode() !== 200) { |
134 | - throw new \UnexpectedValueException('Invalid status code: '. $response->getStatusCode()); |
|
134 | + throw new \UnexpectedValueException('Invalid status code: ' . $response->getStatusCode()); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | return JSON::decode($response->getContent())->token; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * |
35 | 35 | * @return InputOption |
36 | 36 | */ |
37 | - $iterator = function (array $input): InputOption { |
|
37 | + $iterator = function(array $input): InputOption { |
|
38 | 38 | return new InputOption( |
39 | 39 | $input['name'], |
40 | 40 | $input['shortcut'] ?? null, |