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