Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
50 | protected function getClassConfig($class) |
||
51 | { |
||
52 | // Autoload the class if it exists |
||
53 | if(!class_exists($class)) { |
||
54 | return []; |
||
55 | } |
||
56 | |||
57 | /** @var \ReflectionProperty[] **/ |
||
58 | $props = (new ReflectionClass($class)) |
||
59 | ->getProperties(ReflectionProperty::IS_STATIC | ReflectionProperty::IS_PRIVATE); |
||
60 | |||
61 | $classConfig = []; |
||
62 | |||
63 | foreach($props as $prop) { |
||
64 | $prop->setAccessible(true); |
||
65 | $classConfig[$prop->getName()] = $prop->getValue(); |
||
66 | } |
||
67 | |||
68 | return $classConfig; |
||
69 | } |
||
70 | |||
72 |