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: | class MethodTagParameter |
10: | { |
11: | |
12: | public function __construct( |
13: | private Type $type, |
14: | private PassedByReference $passedByReference, |
15: | private bool $isOptional, |
16: | private bool $isVariadic, |
17: | private ?Type $defaultValue, |
18: | ) |
19: | { |
20: | } |
21: | |
22: | public function getType(): Type |
23: | { |
24: | return $this->type; |
25: | } |
26: | |
27: | public function passedByReference(): PassedByReference |
28: | { |
29: | return $this->passedByReference; |
30: | } |
31: | |
32: | public function isOptional(): bool |
33: | { |
34: | return $this->isOptional; |
35: | } |
36: | |
37: | public function isVariadic(): bool |
38: | { |
39: | return $this->isVariadic; |
40: | } |
41: | |
42: | public function getDefaultValue(): ?Type |
43: | { |
44: | return $this->defaultValue; |
45: | } |
46: | |
47: | } |
48: | |