mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 13:38:22 +01:00
Display enum cases
This commit is contained in:
parent
9451ed7e12
commit
6d9718fc8c
@ -4,6 +4,7 @@ namespace Formwork\Utils;
|
||||
|
||||
use ReflectionReference;
|
||||
use UnexpectedValueException;
|
||||
use UnitEnum;
|
||||
|
||||
class Debug
|
||||
{
|
||||
@ -209,6 +210,10 @@ class Debug
|
||||
return sprintf("<span class=\"__type-array\">array</span>(<span class=\"__note\">%d</span>) [<span class=\"__formwork-dump-toggle\" onclick=\"__formwork_dump_toggle(this)\" data-target=\"__formwork-dump-id-%2\$d\">▼</span>\n<div class=\"__formwork-dump-collapsed\" id=\"__formwork-dump-id-%d\">%s</div>%s]", count($data), ++static::$counter, implode("\n", $parts), str_repeat(' ', $indent));
|
||||
|
||||
case 'object':
|
||||
if ($data instanceof UnitEnum) {
|
||||
return sprintf('<span class="__type-name">%s</span>::<span class="__type-name">%s</span>', $data::class, $data->name);
|
||||
}
|
||||
|
||||
$id = spl_object_id($data);
|
||||
|
||||
$class = $data::class;
|
||||
|
Loading…
x
Reference in New Issue
Block a user