1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc\Tag; |
4: | |
5: | use PHPStan\Reflection\PassedByReference; |
6: | use PHPStan\Type\Type; |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | class MethodTagParameter |
13: | { |
14: | |
15: | public function __construct( |
16: | private Type $type, |
17: | private PassedByReference $passedByReference, |
18: | private bool $isOptional, |
19: | private bool $isVariadic, |
20: | private ?Type $defaultValue, |
21: | ) |
22: | { |
23: | } |
24: | |
25: | public function getType(): Type |
26: | { |
27: | return $this->type; |
28: | } |
29: | |
30: | public function passedByReference(): PassedByReference |
31: | { |
32: | return $this->passedByReference; |
33: | } |
34: | |
35: | public function isOptional(): bool |
36: | { |
37: | return $this->isOptional; |
38: | } |
39: | |
40: | public function isVariadic(): bool |
41: | { |
42: | return $this->isVariadic; |
43: | } |
44: | |
45: | public function getDefaultValue(): ?Type |
46: | { |
47: | return $this->defaultValue; |
48: | } |
49: | |
50: | } |
51: | |