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