Conditions | 4 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
20 | public static function extract($object) |
||
21 | { |
||
22 | $array = []; |
||
23 | |||
24 | foreach ((new \ReflectionClass($object))->getProperties() as $property) { |
||
25 | $config = new PropertyConfiguration($property, $object); |
||
26 | |||
27 | if ($config->ignore() || $config->shouldIgnoreIfNull()) |
||
28 | continue; |
||
29 | |||
30 | $name = $config->getAlias(); |
||
31 | $data = $config->getValue(); |
||
32 | |||
33 | $array[$name] = $data; |
||
34 | } |
||
35 | |||
36 | return $array; |
||
37 | } |
||
38 | } |