| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function toArray() |
||
| 20 | { |
||
| 21 | $result = []; |
||
| 22 | foreach ($this as $key => $value) { |
||
| 23 | $result[$key] = $value; |
||
| 24 | } |
||
| 25 | foreach ((new \ReflectionClass($this))->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { |
||
| 26 | $result[$property->name] = $this->{$property->name}; |
||
| 27 | } |
||
| 28 | return $result; |
||
| 29 | } |
||
| 30 | } |