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