@@ -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); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $repository = _em()->getRepository(User::class); |
| 51 | 51 | |
| 52 | 52 | /** @var null|User $user */ |
| 53 | - $user = $repository->getAclFilter()->runWithoutAcl(fn () => $repository->findOneByEmail($args['email'])); |
|
| 53 | + $user = $repository->getAclFilter()->runWithoutAcl(fn() => $repository->findOneByEmail($args['email'])); |
|
| 54 | 54 | |
| 55 | 55 | $existingUser = (bool) $user; |
| 56 | 56 | if (!$existingUser) { |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $config = [ |
| 15 | 15 | 'query' => _types()->get(QueryType::class), |
| 16 | 16 | 'mutation' => _types()->get(MutationType::class), |
| 17 | - 'typeLoader' => fn ($name) => _types()->get($name), |
|
| 17 | + 'typeLoader' => fn($name) => _types()->get($name), |
|
| 18 | 18 | ]; |
| 19 | 19 | |
| 20 | 20 | parent::__construct($config); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function getOneById(int $id): ?User |
| 69 | 69 | { |
| 70 | - $user = $this->getAclFilter()->runWithoutAcl(fn () => $this->findOneById($id)); |
|
| 70 | + $user = $this->getAclFilter()->runWithoutAcl(fn() => $this->findOneById($id)); |
|
| 71 | 71 | |
| 72 | 72 | return $user; |
| 73 | 73 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function getOneByLogin(?string $login): ?User |
| 81 | 81 | { |
| 82 | - $user = $this->getAclFilter()->runWithoutAcl(fn () => $this->findOneByLogin($login)); |
|
| 82 | + $user = $this->getAclFilter()->runWithoutAcl(fn() => $this->findOneByLogin($login)); |
|
| 83 | 83 | |
| 84 | 84 | return $user; |
| 85 | 85 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ->setParameter('status', User::STATUS_ACTIVE) |
| 99 | 99 | ->setParameter('role', User::ROLE_ADMINISTRATOR); |
| 100 | 100 | |
| 101 | - $result = $this->getAclFilter()->runWithoutAcl(fn () => $qb->getQuery()->getResult()); |
|
| 101 | + $result = $this->getAclFilter()->runWithoutAcl(fn() => $qb->getQuery()->getResult()); |
|
| 102 | 102 | |
| 103 | 103 | return $result; |
| 104 | 104 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $qb->andWhere('account.balance < 0'); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - $result = $this->getAclFilter()->runWithoutAcl(fn () => $qb->getQuery()->getResult()); |
|
| 129 | + $result = $this->getAclFilter()->runWithoutAcl(fn() => $qb->getQuery()->getResult()); |
|
| 130 | 130 | |
| 131 | 131 | return $result; |
| 132 | 132 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function getOneById(int $id): Account |
| 70 | 70 | { |
| 71 | - $account = $this->getAclFilter()->runWithoutAcl(fn () => $this->findOneById($id)); |
|
| 71 | + $account = $this->getAclFilter()->runWithoutAcl(fn() => $this->findOneById($id)); |
|
| 72 | 72 | |
| 73 | 73 | if (!$account) { |
| 74 | 74 | throw new Exception('Account #' . $id . ' not found'); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $user = $user->getOwner(); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - $account = $this->getAclFilter()->runWithoutAcl(fn () => $this->findOneByOwner($user)); |
|
| 98 | + $account = $this->getAclFilter()->runWithoutAcl(fn() => $this->findOneByOwner($user)); |
|
| 99 | 99 | |
| 100 | 100 | if (!$account) { |
| 101 | 101 | $account = new Account(); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | $config = $container->get('config'); |
| 108 | 108 | $parentCode = (int) $config['accounting']['customerDepositsAccountCode']; |
| 109 | - $parent = $this->getAclFilter()->runWithoutAcl(fn () => $this->findOneByCode($parentCode)); |
|
| 109 | + $parent = $this->getAclFilter()->runWithoutAcl(fn() => $this->findOneByCode($parentCode)); |
|
| 110 | 110 | |
| 111 | 111 | // Find the max account code, using the liability parent code as prefix |
| 112 | 112 | if (!$this->maxCode) { |
@@ -192,6 +192,4 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | $count = $this->getEntityManager()->getConnection()->executeStatement($sql); |
| 194 | 194 | |
| 195 | - return $count; |
|
| 196 | - } |
|
| 197 | -} |
|
| 195 | + return $count |
|
| 198 | 196 | \ No newline at end of file |