@@ -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 |