Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | class Type |
||
19 | { |
||
20 | /** |
||
21 | * @var string|null |
||
22 | */ |
||
23 | private $className; |
||
24 | |||
25 | /** |
||
26 | * @param mixed[] $attributes |
||
27 | */ |
||
28 | public function __construct(array $attributes = []) |
||
29 | { |
||
30 | if (!isset($attributes['class'])) { |
||
31 | throw new MissingAnnotationException('In annotation @Type, missing compulsory parameter "class".'); |
||
32 | } |
||
33 | $this->className = $attributes['class']; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Returns the name of the GraphQL query/mutation/field. |
||
38 | * If not specified, the name of the method should be used instead. |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getClass(): string |
||
45 | } |
||
46 | } |
||
47 |