Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public static function getConstants($class) |
||
21 | { |
||
22 | static $constants = []; |
||
23 | if (is_object($class)) { |
||
24 | $class = get_class($class); |
||
25 | } |
||
26 | if (!isset($constants[$class])) { |
||
27 | $constants[$class] = (new \ReflectionClass($class))->getConstants(); |
||
28 | } |
||
29 | return $constants[$class]; |
||
30 | } |
||
31 | } |
||
32 |