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 ParamOutTagValueNode implements PhpDocTagValueNode
10: {
11:
12: use NodeAttributes;
13:
14: /** @var TypeNode */
15: public $type;
16:
17: /** @var string */
18: public $parameterName;
19:
20: /** @var string (may be empty) */
21: public $description;
22:
23: public function __construct(TypeNode $type, string $parameterName, string $description)
24: {
25: $this->type = $type;
26: $this->parameterName = $parameterName;
27: $this->description = $description;
28: }
29:
30: public function __toString(): string
31: {
32: return trim("{$this->type} {$this->parameterName} {$this->description}");
33: }
34:
35: }
36: