22declare(strict_types=1);
 
   27use 
function mb_strtoupper;
 
   28use 
function spl_object_id;
 
   36trait LegacyEnumShimTrait{
 
   41    public static function __callStatic(
string $name, array $arguments) : self{
 
   42        if(count($arguments) > 0){
 
   43            throw new \ArgumentCountError(
"Expected exactly 0 arguments, " . count($arguments) . 
" passed");
 
   54    public static function getAll() : array{
 
   56        static $result = null;
 
   59            foreach(self::cases() as $case){
 
   60                $result[mb_strtoupper($case->name)] = $case;
 
   71    public function name() : string{
 
   80    public function id() : int{
 
   81        return spl_object_id($this);
 
   89    public function equals(
self $other) : bool{
 
   90        return $this === $other;
 
static __callStatic($name, $arguments)