public static function getNameForOrdinal($enumType, $ordinal)
    {
        $constants = $enumType::values();
        $result = null;

        foreach ($constants as $constant) {
            if ($constant->getOrdinal() === $ordinal) {
                $result = $constant->getName();
                break;
            }
        }

        return $result;
    }