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