final public function ordinal(): int
    {
        if ($this->ordinal === null) {
            $ordinal = 0;
            foreach (self::getMembers() as $constValue) {
                if ($this->value === $constValue) {
                    break;
                }
                $ordinal++;
            }
            $this->ordinal = $ordinal;
        }

        return $this->ordinal;
    }