| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | protected static function extract(object $object): array |
||
| 40 | { |
||
| 41 | $properties = (array) $object; |
||
| 42 | foreach ($properties as $key => $value) { |
||
| 43 | if (is_int($pos = strrpos((string) $key, "\0"))) { |
||
| 44 | $name = substr((string) $key, $pos + 1); |
||
| 45 | if (array_key_exists($name, $properties)) { |
||
| 46 | throw new OverriddenPropertyException($object::class, $name); |
||
| 47 | } |
||
| 48 | $properties[$name] = $value; |
||
| 49 | unset($properties[$key]); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | return $properties; |
||
| 53 | } |
||
| 55 |