| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class VariableDefinitionWriter extends AbstractWriter |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param NodeInterface|VariableDefinitionNode $node |
||
| 13 | * @inheritdoc |
||
| 14 | */ |
||
| 15 | public function write(NodeInterface $node): string |
||
| 16 | { |
||
| 17 | $variable = $this->printNode($node->getVariable()); |
||
| 18 | $type = $this->printNode($node->getType()); |
||
| 19 | $defaultValue = $this->printNode($node->getDefaultValue()); |
||
| 20 | |||
| 21 | return $variable . ': ' . $type . wrap(' = ', $defaultValue); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @inheritdoc |
||
| 26 | */ |
||
| 27 | public function supportsWriter(NodeInterface $node): bool |
||
| 30 | } |
||
| 31 | } |
||
| 32 |