Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function __invoke($var) |
||
17 | { |
||
18 | $ref = new \ReflectionObject($var); |
||
19 | |||
20 | $result = []; |
||
21 | foreach($ref->getProperties() as $property) { |
||
22 | if(in_array($property->getName(), $this->skipped)) { |
||
23 | continue; |
||
24 | } |
||
25 | |||
26 | $property->setAccessible(true); |
||
27 | |||
28 | $result[$property->getName()] = $property->getValue($var); |
||
29 | } |
||
30 | |||
31 | return $result; |
||
32 | } |
||
33 | } |
||
34 |