| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\PhpDocParser\Ast\PhpDoc; |
| 4: | |
| 5: | use PHPStan\PhpDocParser\Ast\NodeAttributes; |
| 6: | use PHPStan\PhpDocParser\Ast\Type\TypeNode; |
| 7: | use function trim; |
| 8: | |
| 9: | class VarTagValueNode implements PhpDocTagValueNode |
| 10: | { |
| 11: | |
| 12: | use NodeAttributes; |
| 13: | |
| 14: | |
| 15: | public $type; |
| 16: | |
| 17: | |
| 18: | public $variableName; |
| 19: | |
| 20: | |
| 21: | public $description; |
| 22: | |
| 23: | public function __construct(TypeNode $type, string $variableName, string $description) |
| 24: | { |
| 25: | $this->type = $type; |
| 26: | $this->variableName = $variableName; |
| 27: | $this->description = $description; |
| 28: | } |
| 29: | |
| 30: | |
| 31: | public function __toString(): string |
| 32: | { |
| 33: | return trim("$this->type " . trim("{$this->variableName} {$this->description}")); |
| 34: | } |
| 35: | |
| 36: | } |
| 37: | |