Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class ExampleAbstractObjectType extends AbstractObjectType implements ResolveFieldAwareInterface |
||
13 | { |
||
14 | protected string $name = 'ExampleAbstractObjectType'; |
||
15 | |||
16 | protected iterable $fields = [ |
||
17 | 'lastname' => 'String', |
||
18 | 'firstname' => [ |
||
19 | 'type' => 'String', |
||
20 | 'mode' => TypeAwareInterface::IS_REQUIRED, |
||
21 | 'description' => 'User firstname', |
||
22 | 'resolve' => [self::class, 'getFirstname'], |
||
23 | ], |
||
24 | ]; |
||
25 | |||
26 | protected iterable $interfaces = [ExampleAbstractInterfaceType::class]; |
||
27 | |||
28 | private function getFirstname(User $user): string |
||
31 | } |
||
32 | |||
33 | public function resolveField(mixed $value, array $args, mixed $context, Webonyx\ResolveInfo $info): mixed |
||
42 |