| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1.037 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 1 | public static function build(): array |
|
| 15 | { |
||
| 16 | return |
||
| 17 | [ |
||
| 18 | 1 | 'name' => 'nextAccountCode', |
|
| 19 | 1 | 'type' => Type::nonNull(Type::int()), |
|
| 20 | 'description' => 'Next available account code for creation', |
||
| 21 | 'args' => [], |
||
| 22 | 1 | 'resolve' => function ($root, array $args): int { |
|
| 23 | /** @var AccountRepository $repository */ |
||
| 24 | $repository = _em()->getRepository(Account::class); |
||
| 25 | |||
| 26 | return $repository->getNextCodeAvailable(); |
||
| 27 | }, |
||
| 31 |