Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class FieldContext |
||
10 | { |
||
11 | /** |
||
12 | * @var CompositeTypeInterface|null |
||
13 | */ |
||
14 | protected $parentType; |
||
15 | |||
16 | /** |
||
17 | * @var FieldNode |
||
18 | */ |
||
19 | protected $node; |
||
20 | |||
21 | /** |
||
22 | * @var Field|null |
||
23 | */ |
||
24 | protected $definition; |
||
25 | |||
26 | /** |
||
27 | * FieldContext constructor. |
||
28 | * @param CompositeTypeInterface|null $parentType |
||
29 | * @param FieldNode $node |
||
30 | * @param Field|null $definition |
||
31 | */ |
||
32 | public function __construct( |
||
33 | ?CompositeTypeInterface $parentType, |
||
34 | FieldNode $node, |
||
35 | ?Field $definition = null |
||
36 | ) { |
||
37 | $this->parentType = $parentType; |
||
38 | $this->node = $node; |
||
39 | $this->definition = $definition; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return CompositeTypeInterface|null |
||
44 | */ |
||
45 | public function getParentType(): ?CompositeTypeInterface |
||
46 | { |
||
47 | return $this->parentType; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return FieldNode |
||
52 | */ |
||
53 | public function getNode(): FieldNode |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return Field|null |
||
60 | */ |
||
61 | public function getDefinition(): ?Field |
||
66 |