<?php
namespace Incoviba\Model\Proyecto\Broker\Contract\State;

enum Type: int
{
    case ACTIVE = 1;
    case INACTIVE = 0;

    public static function name(int $type): string
    {
        return match ($type) {
            self::ACTIVE => 'active',
            self::INACTIVE => 'inactive',
            default => throw new \InvalidArgumentException('Unexpected match value')
        };
    }
}