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