vito/app/Traits/Enum.php
2025-03-12 13:31:10 +01:00

17 lines
251 B
PHP

<?php
namespace App\Traits;
trait Enum
{
/**
* @return array<string, mixed>
*/
public static function all(): array
{
$reflection = new \ReflectionClass(self::class);
return $reflection->getConstants();
}
}