Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class InlineFragmentWriter extends AbstractWriter |
||
10 | { |
||
11 | /** |
||
12 | * @param NodeInterface|InlineFragmentNode $node |
||
13 | * @inheritdoc |
||
14 | */ |
||
15 | public function write(NodeInterface $node): string |
||
16 | { |
||
17 | $typeCondition = $this->printNode($node->getTypeCondition()); |
||
|
|||
18 | $directives = $this->printNodes($node->getDirectives()); |
||
19 | $selectionSet = $this->printNode($node->getSelectionSet()); |
||
20 | |||
21 | return implode(' ', ['...', wrap('on ', $typeCondition), implode(' ', $directives), $selectionSet]); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @inheritdoc |
||
26 | */ |
||
27 | public function supportsWriter(NodeInterface $node): bool |
||
30 | } |
||
31 | } |
||
32 |