Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1.0122 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 1 | public static function build(): array |
|
16 | { |
||
17 | 1 | return |
|
18 | 1 | [ |
|
19 | 1 | 'name' => 'collectionCopyrights', |
|
20 | 1 | 'type' => Type::nonNull(Type::string()), |
|
21 | 1 | 'description' => 'Returns the copyrights of given card', |
|
22 | 1 | 'args' => [ |
|
23 | 1 | 'card' => Type::nonNull(_types()->getId(Card::class)), |
|
24 | 1 | ], |
|
25 | 1 | 'resolve' => function (array $root, array $args): string { |
|
26 | $card = $args['card']->getEntity(); |
||
27 | |||
28 | /** @var CollectionRepository $collectionRepository */ |
||
29 | $collectionRepository = _em()->getRepository(Collection::class); |
||
30 | |||
31 | return $collectionRepository->getCopyrights($card); |
||
32 | 1 | }, |
|
36 |