Total Complexity | 4 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | trait ClassLikeTrait |
||
18 | { |
||
19 | /** |
||
20 | * @var FunctionModelInterface[]|Collection $functions Class functions. |
||
21 | */ |
||
22 | protected $functions; |
||
23 | |||
24 | /** |
||
25 | * @param FunctionModelInterface $function The function to add on this parent. |
||
26 | */ |
||
27 | public function addFunction(FunctionModelInterface $function): void |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return FunctionModelInterface[]|Collection All the functions contained in this parent. |
||
34 | */ |
||
35 | public function getFunctions(): Collection |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Check if a function exists. |
||
42 | * |
||
43 | * @param string $name The function name. |
||
44 | * |
||
45 | * @return bool True if it exists. |
||
46 | */ |
||
47 | public function hasMethod(string $name): bool |
||
51 | }); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return int The number of testable (not abstract) function in this parent. |
||
56 | */ |
||
57 | public function countNotAbstractFunctions(): int |
||
64 |