Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | trait ClassLikeTrait |
||
17 | { |
||
18 | /** |
||
19 | * @var FunctionModelInterface[] $functions Class functions. |
||
20 | */ |
||
21 | private $functions = []; |
||
22 | |||
23 | /** |
||
24 | * @param FunctionModelInterface $function The function to add on this parent. |
||
25 | */ |
||
26 | public function addFunction(FunctionModelInterface $function): void |
||
27 | { |
||
28 | $this->functions[] = $function; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return FunctionModelInterface[] All the functions contained in this parent. |
||
33 | */ |
||
34 | public function getFunctions(): array |
||
35 | { |
||
36 | return $this->functions; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return int The number of function in this parent. |
||
41 | */ |
||
42 | public function countFunctions(): int |
||
45 | } |
||
46 | } |
||
47 |