This commit is contained in:
Olusesan Ameye
2022-10-02 00:26:03 +00:00
parent f8b7061089
commit b4604e02b5
17 changed files with 69 additions and 44 deletions
+6
View File
@@ -30,6 +30,7 @@ use Kint\Zval\Representation\Representation;
use Kint\Zval\Value;
use ReflectionClass;
use ReflectionProperty;
use UnitEnum;
class ClassStaticsPlugin extends Plugin
{
@@ -56,6 +57,11 @@ class ClassStaticsPlugin extends Plugin
$consts = [];
foreach ($reflection->getConstants() as $name => $val) {
// Skip enum constants
if ($var instanceof UnitEnum && $val instanceof UnitEnum && $o->classname == \get_class($val)) {
continue;
}
$const = Value::blank($name, '\\'.$class.'::'.$name);
$const->const = true;
$const->depth = $o->depth + 1;