Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class UniqueFragmentNamesRule extends AbstractRule |
||
17 | { |
||
18 | /** |
||
19 | * @var string[] |
||
20 | */ |
||
21 | protected $knownFragmentNames = []; |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | protected function enterOperationDefinition(OperationDefinitionNode $node): ?NodeInterface |
||
27 | { |
||
28 | return null; // Fragments cannot be defined inside operation definitions. |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | protected function enterFragmentDefinition(FragmentDefinitionNode $node): ?NodeInterface |
||
50 | } |
||
51 | } |
||
52 |