Conditions | 5 |
Paths | 4 |
Total Lines | 23 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
30 | 7 | public function getAccessors($subject) |
|
31 | { |
||
32 | 7 | $class = self::ensureReflection($subject); |
|
33 | |||
34 | 7 | $result = []; |
|
35 | 7 | $current = $class; |
|
36 | |||
37 | 7 | while ($current) { |
|
38 | |||
39 | 7 | foreach ($current->getProperties() as $property) { |
|
40 | |||
41 | 7 | $propertyName = $property->getName(); |
|
42 | |||
43 | 7 | if (false === isset($result[$propertyName]) && false === $property->isStatic()) { |
|
44 | 7 | $result[$propertyName] = $this->factory->create($class, $property); |
|
45 | } |
||
46 | } |
||
47 | |||
48 | 7 | $current = $current->getParentClass(); |
|
49 | } |
||
50 | |||
51 | 7 | return $result; |
|
52 | } |
||
53 | |||
59 |