@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Utils/JSON.php |
5 | 5 | * |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public static function encode($input, ?int $options = null, ?int $depth = null): string |
42 | 42 | { |
43 | - $options ??= 0; |
|
44 | - $depth ??= 512; |
|
43 | + $options ?? = 0; |
|
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 | } |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public static function decode(string $json, ?bool $assoc = null, ?int $depth = null, ?int $options = null) |
68 | 68 | { |
69 | - $assoc ??= false; |
|
70 | - $depth ??= 512; |
|
71 | - $options ??= 0; |
|
69 | + $assoc ?? = false; |
|
70 | + $depth ?? = 512; |
|
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 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Controller/UserController.php |
5 | 5 | * |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | SerializerInterface $serializer, |
500 | 500 | ?int $status = null |
501 | 501 | ): JsonResponse { |
502 | - $status ??= 200; |
|
502 | + $status ?? = 200; |
|
503 | 503 | |
504 | 504 | $groups = [ |
505 | 505 | 'groups' => [ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Controller/UserGroupController.php |
5 | 5 | * |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | SerializerInterface $serializer, |
357 | 357 | ?int $status = null |
358 | 358 | ): JsonResponse { |
359 | - $status ??= 200; |
|
359 | + $status ?? = 200; |
|
360 | 360 | |
361 | 361 | $groups = [ |
362 | 362 | 'groups' => [ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Doctrine/DBAL/Types/UTCDateTimeType.php |
5 | 5 | * |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function getUtcDateTimeZone(): DateTimeZone |
95 | 95 | { |
96 | - return self::$utc ??= new DateTimeZone('UTC'); |
|
96 | + return self::$utc ?? = new DateTimeZone('UTC'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Repository/BaseRepository.php |
5 | 5 | * |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function save(EntityInterface $entity, ?bool $flush = null): BaseRepositoryInterface |
118 | 118 | { |
119 | - $flush ??= true; |
|
119 | + $flush ?? = true; |
|
120 | 120 | |
121 | 121 | // Persist on database |
122 | 122 | $this->getEntityManager()->persist($entity); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function remove(EntityInterface $entity, ?bool $flush = null): BaseRepositoryInterface |
143 | 143 | { |
144 | - $flush ??= true; |
|
144 | + $flush ?? = true; |
|
145 | 145 | |
146 | 146 | // Remove from database |
147 | 147 | $this->getEntityManager()->remove($entity); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function addCallback(callable $callable, ?array $args = null): BaseRepositoryInterface |
230 | 230 | { |
231 | - $args ??= []; |
|
231 | + $args ?? = []; |
|
232 | 232 | $hash = sha1(serialize(array_merge([spl_object_hash((object)$callable)], $args))); |
233 | 233 | |
234 | 234 | if (!in_array($hash, self::$processedCallbacks, true)) { |
@@ -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/Traits/Resource.php |
5 | 5 | * |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | ?int $offset = null, |
85 | 85 | ?array $search = null |
86 | 86 | ): array { |
87 | - $criteria ??= []; |
|
88 | - $orderBy ??= []; |
|
89 | - $search ??= []; |
|
87 | + $criteria ?? = []; |
|
88 | + $orderBy ?? = []; |
|
89 | + $search ?? = []; |
|
90 | 90 | |
91 | 91 | // Before callback method call |
92 | 92 | $this->beforeFind($criteria, $orderBy, $limit, $offset, $search); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function findOne(string $id, ?bool $throwExceptionIfNotFound = null): ?EntityInterface |
115 | 115 | { |
116 | - $throwExceptionIfNotFound ??= false; |
|
116 | + $throwExceptionIfNotFound ?? = false; |
|
117 | 117 | |
118 | 118 | // Before callback method call |
119 | 119 | $this->beforeFindOne($id); |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | ?array $orderBy = null, |
147 | 147 | ?bool $throwExceptionIfNotFound = null |
148 | 148 | ): ?EntityInterface { |
149 | - $orderBy ??= []; |
|
150 | - $throwExceptionIfNotFound ??= false; |
|
149 | + $orderBy ?? = []; |
|
150 | + $throwExceptionIfNotFound ?? = false; |
|
151 | 151 | |
152 | 152 | // Before callback method call |
153 | 153 | $this->beforeFindOneBy($criteria, $orderBy); |
@@ -175,8 +175,8 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function count(?array $criteria = null, ?array $search = null): int |
177 | 177 | { |
178 | - $criteria ??= []; |
|
179 | - $search ??= []; |
|
178 | + $criteria ?? = []; |
|
179 | + $search ?? = []; |
|
180 | 180 | |
181 | 181 | // Before callback method call |
182 | 182 | $this->beforeCount($criteria, $search); |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function create(RestDtoInterface $dto, ?bool $flush = null, ?bool $skipValidation = null): EntityInterface |
205 | 205 | { |
206 | - $flush ??= true; |
|
207 | - $skipValidation ??= false; |
|
206 | + $flush ?? = true; |
|
207 | + $skipValidation ?? = false; |
|
208 | 208 | |
209 | 209 | // Validate DTO |
210 | 210 | $this->validateDto($dto, $skipValidation); |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | ?bool $flush = null, |
243 | 243 | ?bool $skipValidation = null |
244 | 244 | ): EntityInterface { |
245 | - $flush ??= true; |
|
246 | - $skipValidation ??= false; |
|
245 | + $flush ?? = true; |
|
246 | + $skipValidation ?? = false; |
|
247 | 247 | |
248 | 248 | // Fetch entity |
249 | 249 | $entity = $this->getEntity($id); |
@@ -287,8 +287,8 @@ discard block |
||
287 | 287 | ?bool $flush = null, |
288 | 288 | ?bool $skipValidation = null |
289 | 289 | ): EntityInterface { |
290 | - $flush ??= true; |
|
291 | - $skipValidation ??= false; |
|
290 | + $flush ?? = true; |
|
291 | + $skipValidation ?? = false; |
|
292 | 292 | |
293 | 293 | // Fetch entity |
294 | 294 | $entity = $this->getEntity($id); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | */ |
327 | 327 | public function delete(string $id, ?bool $flush = null): EntityInterface |
328 | 328 | { |
329 | - $flush ??= true; |
|
329 | + $flush ?? = true; |
|
330 | 330 | |
331 | 331 | // Fetch entity |
332 | 332 | $entity = $this->getEntity($id); |
@@ -356,8 +356,8 @@ discard block |
||
356 | 356 | */ |
357 | 357 | public function getIds(?array $criteria = null, ?array $search = null): array |
358 | 358 | { |
359 | - $criteria ??= []; |
|
360 | - $search ??= []; |
|
359 | + $criteria ?? = []; |
|
360 | + $search ?? = []; |
|
361 | 361 | |
362 | 362 | // Before callback method call |
363 | 363 | $this->beforeIds($criteria, $search); |
@@ -384,8 +384,8 @@ discard block |
||
384 | 384 | */ |
385 | 385 | public function save(EntityInterface $entity, ?bool $flush = null, ?bool $skipValidation = null): EntityInterface |
386 | 386 | { |
387 | - $flush ??= true; |
|
388 | - $skipValidation ??= false; |
|
387 | + $flush ?? = true; |
|
388 | + $skipValidation ?? = false; |
|
389 | 389 | |
390 | 390 | // Before callback method call |
391 | 391 | $this->beforeSave($entity); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Helpers/StopwatchAwareTrait.php |
5 | 5 | * |
@@ -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/RestResource.php |
5 | 5 | * |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | RestDtoInterface $dto, |
173 | 173 | ?bool $patch = null |
174 | 174 | ): RestDtoInterface { |
175 | - $patch ??= false; |
|
175 | + $patch ?? = false; |
|
176 | 176 | |
177 | 177 | // Fetch entity |
178 | 178 | $entity = $this->getEntity($id); |
@@ -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 | * |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | protected function transformUserGroups(array $userGroups): array |
54 | 54 | { |
55 | 55 | return array_map( |
56 | - fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
56 | + fn(string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
57 | 57 | $userGroups |
58 | 58 | ); |
59 | 59 | } |