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