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