| Total Complexity | 4 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class VariableDefinitionNode extends AbstractNode implements DefinitionNodeInterface |
||
| 8 | { |
||
| 9 | |||
| 10 | use NameTrait; |
||
| 11 | use DefaultValueTrait; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $kind = NodeKindEnum::VARIABLE_DEFINITION; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var VariableNode |
||
| 20 | */ |
||
| 21 | protected $variable; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var TypeNodeInterface |
||
| 25 | */ |
||
| 26 | protected $type; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return VariableNode |
||
| 30 | */ |
||
| 31 | public function getVariable(): VariableNode |
||
| 32 | { |
||
| 33 | return $this->variable; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return TypeNodeInterface |
||
| 38 | */ |
||
| 39 | public function getType(): TypeNodeInterface |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param VariableNode $variable |
||
| 46 | * @return VariableDefinitionNode |
||
| 47 | */ |
||
| 48 | public function setVariable(VariableNode $variable): VariableDefinitionNode |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param TypeNodeInterface $type |
||
| 56 | * @return VariableDefinitionNode |
||
| 57 | */ |
||
| 58 | public function setType(TypeNodeInterface $type): VariableDefinitionNode |
||
| 64 |