1 | <?php |
||
28 | final class Function_ implements Element |
||
29 | // // @codingStandardsIgnoreEnd |
||
30 | { |
||
31 | /** |
||
32 | * @var Fqsen Full Qualified Structural Element Name |
||
33 | */ |
||
34 | private $fqsen; |
||
35 | |||
36 | /** @var Argument[] $arguments */ |
||
37 | private $arguments = []; |
||
38 | |||
39 | /** |
||
40 | * @var DocBlock|null |
||
41 | */ |
||
42 | private $docBlock; |
||
43 | |||
44 | /** |
||
45 | * @var Location |
||
46 | */ |
||
47 | private $location; |
||
48 | |||
49 | /** |
||
50 | * @var Type |
||
51 | */ |
||
52 | private $returnType; |
||
53 | |||
54 | /** |
||
55 | * Initializes the object. |
||
56 | * |
||
57 | * @param DocBlock|null $docBlock |
||
58 | * @param Location|null $location |
||
59 | * @param Type|null $returnType |
||
60 | */ |
||
61 | 5 | public function __construct( |
|
80 | |||
81 | /** |
||
82 | * Returns the arguments of this function. |
||
83 | * |
||
84 | * @return Argument[] |
||
85 | */ |
||
86 | 1 | public function getArguments(): array |
|
90 | |||
91 | /** |
||
92 | * Add an argument to the function. |
||
93 | */ |
||
94 | 1 | public function addArgument(Argument $argument): void |
|
98 | |||
99 | /** |
||
100 | * Returns the Fqsen of the element. |
||
101 | */ |
||
102 | 1 | public function getFqsen(): Fqsen |
|
106 | |||
107 | /** |
||
108 | * Returns the name of the element. |
||
109 | */ |
||
110 | 1 | public function getName(): string |
|
114 | |||
115 | /** |
||
116 | * Returns the DocBlock of the element if available |
||
117 | */ |
||
118 | 1 | public function getDocBlock(): ?DocBlock |
|
122 | |||
123 | public function getLocation(): Location |
||
127 | |||
128 | 2 | public function getReturnType(): Type |
|
132 | } |
||
133 |