Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1.037 |
Changes | 0 |
1 | <?php |
||
16 | 1 | public static function build(): iterable |
|
17 | { |
||
18 | 1 | yield 'exportTransactionLines' => fn () => [ |
|
19 | 1 | 'type' => Type::nonNull(Type::string()), |
|
20 | 1 | 'description' => 'Prepare an export of transactionLines and return the URL to download it', |
|
21 | 1 | 'args' => Standard::getListArguments(TransactionLine::class, false), |
|
22 | 1 | 'resolve' => function ($root, array $args, SessionInterface $session): string { |
|
23 | global $container; |
||
24 | |||
25 | /** @var TransactionLines $exporter */ |
||
26 | $exporter = $container->get(TransactionLines::class); |
||
27 | |||
28 | $qb = Standard::createFilteredQueryBuilder(TransactionLine::class, $args); |
||
29 | |||
30 | return $exporter->export($qb->getQuery()->getResult()); |
||
|
|||
31 | 1 | }, |
|
35 |