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 | 1 | public function setMethod(MethodDescriptor $method) |
|
47 | |||
48 | public function getMethod(): ?MethodDescriptor |
||
52 | |||
53 | 1 | /** |
|
54 | 1 | * {@inheritDoc} |
|
55 | */ |
||
56 | public function setType(?Type $type) |
||
60 | |||
61 | 2 | /** |
|
62 | 1 | * {@inheritDoc} |
|
63 | */ |
||
64 | public function getType(): ?Type |
||
72 | |||
73 | public function getTypes(): array |
||
78 | |||
79 | 1 | /** |
|
80 | 1 | * @return null|ArgumentDescriptor |
|
81 | 1 | */ |
|
82 | 1 | public function getInheritedElement() |
|
96 | |||
97 | 1 | /** |
|
98 | 1 | * {@inheritDoc} |
|
99 | */ |
||
100 | public function setDefault($value) |
||
104 | |||
105 | 1 | /** |
|
106 | * {@inheritDoc} |
||
107 | */ |
||
108 | public function getDefault() |
||
112 | |||
113 | 1 | /** |
|
114 | 1 | * {@inheritDoc} |
|
115 | */ |
||
116 | public function setByReference($byReference) |
||
120 | |||
121 | 1 | /** |
|
122 | * {@inheritDoc} |
||
123 | */ |
||
124 | public function isByReference() |
||
128 | |||
129 | /** |
||
130 | * Sets whether this argument represents a variadic argument. |
||
131 | 1 | * |
|
132 | * @param boolean $isVariadic |
||
133 | 1 | * |
|
134 | 1 | * @return false |
|
135 | */ |
||
136 | public function setVariadic($isVariadic) |
||
140 | |||
141 | 1 | /** |
|
142 | * Returns whether this argument represents a variadic argument. |
||
143 | 1 | * |
|
144 | * @return boolean |
||
145 | */ |
||
146 | public function isVariadic() |
||
150 | } |
||
151 |