Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
55 | 2 | protected function getClassConfig($class) |
|
56 | { |
||
57 | /** @var \ReflectionProperty[] **/ |
||
58 | 2 | $props = (new ReflectionClass($class)) |
|
59 | 2 | ->getProperties(ReflectionProperty::IS_STATIC); |
|
60 | |||
61 | 2 | $classConfig = []; |
|
62 | |||
63 | 2 | foreach($props as $prop) { |
|
64 | 2 | if(!$prop->isPrivate()) { |
|
65 | // Ignore anything which isn't private |
||
66 | 2 | continue; |
|
67 | } |
||
68 | |||
69 | 2 | $prop->setAccessible(true); |
|
70 | 2 | $classConfig[$prop->getName()] = $prop->getValue(); |
|
71 | 2 | } |
|
72 | |||
73 | 2 | return $classConfig; |
|
74 | } |
||
75 | |||
77 |