| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | protected function getObjectFields(): iterable |
||
| 37 | { |
||
| 38 | $reflection = new \ReflectionObject($this); |
||
| 39 | |||
| 40 | $flags = \ReflectionProperty::IS_PROTECTED | \ReflectionProperty::IS_PUBLIC; |
||
| 41 | |||
| 42 | foreach ($reflection->getProperties($flags) as $field) { |
||
| 43 | $field->setAccessible(true); |
||
| 44 | |||
| 45 | yield $field->getName() => $field->getValue($this); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | } |
||
| 49 |