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 | /** |
||
37 | * @var Argument[] |
||
38 | */ |
||
39 | private $arguments = []; |
||
40 | |||
41 | /** |
||
42 | * @var DocBlock|null |
||
43 | */ |
||
44 | private $docBlock; |
||
45 | |||
46 | /** |
||
47 | * @var Location |
||
48 | */ |
||
49 | private $location; |
||
50 | |||
51 | /** |
||
52 | * @var Type |
||
53 | */ |
||
54 | private $returnType; |
||
55 | |||
56 | /** |
||
57 | * Initializes the object. |
||
58 | * |
||
59 | * @param DocBlock|null $docBlock |
||
60 | * @param Location|null $location |
||
61 | * @param Type|null $returnType |
||
62 | */ |
||
63 | 5 | public function __construct( |
|
82 | |||
83 | /** |
||
84 | * Returns the arguments of this function. |
||
85 | * |
||
86 | * @return Argument[] |
||
87 | */ |
||
88 | 1 | public function getArguments(): array |
|
92 | |||
93 | /** |
||
94 | * Add an argument to the function. |
||
95 | */ |
||
96 | 1 | public function addArgument(Argument $argument): void |
|
100 | |||
101 | /** |
||
102 | * Returns the Fqsen of the element. |
||
103 | */ |
||
104 | 1 | public function getFqsen(): Fqsen |
|
108 | |||
109 | /** |
||
110 | * Returns the name of the element. |
||
111 | */ |
||
112 | 1 | public function getName(): string |
|
116 | |||
117 | /** |
||
118 | * Returns the DocBlock of the element if available |
||
119 | */ |
||
120 | 1 | public function getDocBlock(): ?DocBlock |
|
124 | |||
125 | public function getLocation(): Location |
||
129 | |||
130 | 2 | public function getReturnType(): Type |
|
134 | } |
||
135 |