Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | 3 | public static function build(): iterable |
|
15 | { |
||
16 | 1 | yield 'permissions' => fn () => [ |
|
17 | 1 | 'type' => Type::nonNull(_types()->get(AllPermissionsType::class)), |
|
18 | 1 | 'description' => 'All permissions for currently logged in user', |
|
19 | 1 | 'args' => [ |
|
20 | 1 | ], |
|
21 | 1 | 'resolve' => function ($root, array $args, $context, ResolveInfo $info) { |
|
22 | 3 | $contexts = $args; |
|
23 | |||
24 | // Return keys with some dummy data to keep the resolving process going deeper in types |
||
25 | 3 | return [ |
|
26 | 3 | 'crud' => ['contexts' => $contexts], |
|
27 | 3 | ]; |
|
32 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.