Conditions | 5 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
24 | 1 | public function toArray(): array |
|
25 | { |
||
26 | 1 | $values = array(); |
|
27 | 1 | $rfClass = new \ReflectionClass(get_class($this)); |
|
28 | 1 | foreach ($rfClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { |
|
29 | 1 | if ($method->getDeclaringClass() != $rfClass) { |
|
30 | 1 | continue; |
|
31 | } |
||
32 | 1 | if (substr($method->name, 0, 3) == 'get' && $method->name != 'get') { |
|
33 | 1 | $values[] = $method->invoke($this); |
|
34 | } |
||
35 | } |
||
36 | 1 | return $values; |
|
37 | } |
||
38 | } |
||
39 |