Total Complexity | 8 |
Total Lines | 86 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class ComparisonContext |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $fieldMap = []; |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $fragmentNames = []; |
||
20 | |||
21 | /** |
||
22 | * @var array|Conflict[] |
||
23 | */ |
||
24 | protected $conflicts = []; |
||
25 | |||
26 | /** |
||
27 | * @param FieldContext $field |
||
28 | * @return $this |
||
29 | */ |
||
30 | public function registerField(FieldContext $field) |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param NodeInterface|FragmentSpreadNode|FragmentDefinitionNode $fragment |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function registerFragment(NodeInterface $fragment) |
||
48 | { |
||
49 | $this->fragmentNames[] = $fragment->getNameValue(); |
||
|
|||
50 | |||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @param Conflict $conflict |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function reportConflict(Conflict $conflict) |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | public function getFieldMap(): array |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getFragmentNames(): array |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function hasConflicts(): bool |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @return array|Conflict[] |
||
91 | */ |
||
92 | public function getConflicts() |
||
97 |