| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\PhpDoc\Tag; |
| 4: | |
| 5: | use PHPStan\Type\Type; |
| 6: | |
| 7: | /** |
| 8: | * @api |
| 9: | * @final |
| 10: | */ |
| 11: | class ParamTag implements TypedTag |
| 12: | { |
| 13: | |
| 14: | public function __construct( |
| 15: | private Type $type, |
| 16: | private bool $isVariadic, |
| 17: | ) |
| 18: | { |
| 19: | } |
| 20: | |
| 21: | public function getType(): Type |
| 22: | { |
| 23: | return $this->type; |
| 24: | } |
| 25: | |
| 26: | public function isVariadic(): bool |
| 27: | { |
| 28: | return $this->isVariadic; |
| 29: | } |
| 30: | |
| 31: | /** |
| 32: | * @return self |
| 33: | */ |
| 34: | public function withType(Type $type): TypedTag |
| 35: | { |
| 36: | return new self($type, $this->isVariadic); |
| 37: | } |
| 38: | |
| 39: | } |
| 40: |