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