1 | <?php |
||
23 | class ArgumentDescriptor extends DescriptorAbstract implements Interfaces\ArgumentInterface |
||
24 | { |
||
25 | /** @var MethodDescriptor $method */ |
||
26 | protected $method; |
||
27 | |||
28 | /** @var Type|null $type normalized type of this argument */ |
||
29 | protected $type = null; |
||
30 | |||
31 | /** @var string|null $default the default value for an argument or null if none is provided */ |
||
32 | protected $default; |
||
33 | |||
34 | /** @var bool $byReference whether the argument passes the parameter by reference instead of by value */ |
||
35 | protected $byReference = false; |
||
36 | |||
37 | /** @var boolean Determines if this Argument represents a variadic argument */ |
||
38 | protected $isVariadic = false; |
||
39 | |||
40 | /** |
||
41 | * To which method does this argument belong to |
||
42 | */ |
||
43 | 2 | public function setMethod(MethodDescriptor $method) |
|
47 | |||
48 | 1 | public function getMethod(): ?MethodDescriptor |
|
52 | |||
53 | /** |
||
54 | * {@inheritDoc} |
||
55 | */ |
||
56 | 1 | public function setType(?Type $type) |
|
60 | |||
61 | /** |
||
62 | * {@inheritDoc} |
||
63 | */ |
||
64 | 2 | public function getType(): ?Type |
|
72 | |||
73 | public function getTypes(): array |
||
78 | |||
79 | /** |
||
80 | * @return null|ArgumentDescriptor |
||
81 | */ |
||
82 | 1 | public function getInheritedElement() |
|
96 | |||
97 | /** |
||
98 | * {@inheritDoc} |
||
99 | */ |
||
100 | 1 | public function setDefault($value) |
|
104 | |||
105 | /** |
||
106 | * {@inheritDoc} |
||
107 | */ |
||
108 | 1 | public function getDefault() |
|
112 | |||
113 | /** |
||
114 | * {@inheritDoc} |
||
115 | */ |
||
116 | 1 | public function setByReference($byReference) |
|
120 | |||
121 | /** |
||
122 | * {@inheritDoc} |
||
123 | */ |
||
124 | 1 | public function isByReference() |
|
128 | |||
129 | /** |
||
130 | * Sets whether this argument represents a variadic argument. |
||
131 | * |
||
132 | * @param boolean $isVariadic |
||
133 | * |
||
134 | * @return false |
||
135 | */ |
||
136 | 1 | public function setVariadic($isVariadic) |
|
140 | |||
141 | /** |
||
142 | * Returns whether this argument represents a variadic argument. |
||
143 | * |
||
144 | * @return boolean |
||
145 | */ |
||
146 | 1 | public function isVariadic() |
|
150 | } |
||
151 |