Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | 15 | public function constructorParameters(): array |
|
38 | { |
||
39 | 15 | if (!$this->hasConstructor()) { |
|
40 | 3 | return []; |
|
41 | } |
||
42 | |||
43 | 12 | $constructors = array_filter($this->functions, function (Method $function) { |
|
44 | 12 | return $function->isConstructor(); |
|
45 | 12 | }); |
|
46 | |||
47 | 12 | return reset($constructors)->params; |
|
48 | } |
||
55 |