@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | private function queueBalanceForEachUsers(array $users): int |
| 119 | 119 | { |
| 120 | 120 | foreach ($users as $user) { |
| 121 | - $bookables = $user->getRunningBookings()->map(fn (Booking $booking) => $booking->getBookable()); |
|
| 121 | + $bookables = $user->getRunningBookings()->map(fn(Booking $booking) => $booking->getBookable()); |
|
| 122 | 122 | |
| 123 | 123 | $this->queueBalance($user, $bookables); |
| 124 | 124 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | // Fallback to family owner if any |
| 155 | 155 | if (!$email && $user->getOwner()) { |
| 156 | - $email = $this->userRepository->getAclFilter()->runWithoutAcl(fn () => $user->getOwner()->getEmail()); |
|
| 156 | + $email = $this->userRepository->getAclFilter()->runWithoutAcl(fn() => $user->getOwner()->getEmail()); |
|
| 157 | 157 | |
| 158 | 158 | $this->toFamilyOwner = true; |
| 159 | 159 | } |
@@ -529,7 +529,7 @@ |
||
| 529 | 529 | */ |
| 530 | 530 | public function getRunningBookings(): Collection |
| 531 | 531 | { |
| 532 | - return $this->bookings->filter(fn (Booking $booking) => $booking->getStatus() === BookingStatusType::BOOKED && $booking->getEndDate() === null); |
|
| 532 | + return $this->bookings->filter(fn(Booking $booking) => $booking->getStatus() === BookingStatusType::BOOKED && $booking->getEndDate() === null); |
|
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | // Only consider approved and unterminated bookings |
| 373 | - $bookings = $this->getBookings()->filter(fn (Booking $booking): bool => !$booking->getEndDate() && $booking->getStatus() !== BookingStatusType::APPLICATION)->toArray(); |
|
| 373 | + $bookings = $this->getBookings()->filter(fn(Booking $booking): bool => !$booking->getEndDate() && $booking->getStatus() !== BookingStatusType::APPLICATION)->toArray(); |
|
| 374 | 374 | |
| 375 | 375 | return $bookings; |
| 376 | 376 | } |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | return []; |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | - $bookings = $this->getBookings()->filter(fn (Booking $booking): bool => !$booking->getEndDate())->toArray(); |
|
| 405 | + $bookings = $this->getBookings()->filter(fn(Booking $booking): bool => !$booking->getEndDate())->toArray(); |
|
| 406 | 406 | |
| 407 | 407 | return $bookings; |
| 408 | 408 | } |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | throw new Exception('Missing config accounting/bankAccountCode'); |
| 170 | 170 | } |
| 171 | 171 | $bankAccountCode = $this->config['accounting']['bankAccountCode']; |
| 172 | - $bankAccount = $accountRepository->getAclFilter()->runWithoutAcl(fn () => $accountRepository->findOneByCode($bankAccountCode)); |
|
| 172 | + $bankAccount = $accountRepository->getAclFilter()->runWithoutAcl(fn() => $accountRepository->findOneByCode($bankAccountCode)); |
|
| 173 | 173 | |
| 174 | 174 | if (!array_key_exists('amount', $body)) { |
| 175 | 175 | // Do not support "registrations" |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | return null; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - $ids = array_map(fn (EntityID $id) => $id->getId(), $args['values']); |
|
| 44 | + $ids = array_map(fn(EntityID $id) => $id->getId(), $args['values']); |
|
| 45 | 45 | |
| 46 | 46 | $bookingAlias = $uniqueNameFactory->createAliasName(Booking::class); |
| 47 | 47 | $param = $uniqueNameFactory->createParameterName(); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | 'name' => 'viewer', |
| 17 | 17 | 'type' => _types()->getOutput(User::class), |
| 18 | 18 | 'description' => 'Represents currently logged-in user', |
| 19 | - 'resolve' => fn ($root, array $args): ?User => User::getCurrent(), |
|
| 19 | + 'resolve' => fn($root, array $args): ?User => User::getCurrent(), |
|
| 20 | 20 | ]; |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $repository = _em()->getRepository(User::class); |
| 28 | 28 | |
| 29 | 29 | /** @var null|User $user */ |
| 30 | - $user = $repository->getAclFilter()->runWithoutAcl(fn () => $repository->findOneByToken($args['token'])); |
|
| 30 | + $user = $repository->getAclFilter()->runWithoutAcl(fn() => $repository->findOneByToken($args['token'])); |
|
| 31 | 31 | |
| 32 | 32 | if (!$user) { |
| 33 | 33 | throw new ExceptionWithoutMailLogging("Le lien que tu as suivi n'est pas valable ou a déjà été utilisé. Effectue une nouvelle demande de changement de mot de passe ou création de compte. Chaque nouvelle demande invalide les précédentes."); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $repository = _em()->getRepository(User::class); |
| 40 | 40 | |
| 41 | 41 | /** @var null|User $user */ |
| 42 | - $user = $repository->getAclFilter()->runWithoutAcl(fn () => $repository->findOneByToken($args['token'])); |
|
| 42 | + $user = $repository->getAclFilter()->runWithoutAcl(fn() => $repository->findOneByToken($args['token'])); |
|
| 43 | 43 | |
| 44 | 44 | if (!$user) { |
| 45 | 45 | throw new ExceptionWithoutMailLogging('La session a expiré ou le lien n\'est pas valable. Effectue une nouvelle demande.'); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $repository = _em()->getRepository(User::class); |
| 39 | 39 | |
| 40 | 40 | /** @var null|User $user */ |
| 41 | - $user = $repository->getAclFilter()->runWithoutAcl(fn () => $repository->findOneByToken($args['token'])); |
|
| 41 | + $user = $repository->getAclFilter()->runWithoutAcl(fn() => $repository->findOneByToken($args['token'])); |
|
| 42 | 42 | |
| 43 | 43 | if (!$user || !$user->isTokenValid()) { |
| 44 | 44 | _log()->info(LogRepository::UPDATE_PASSWORD_FAILED); |