public static function isDefinedName($enumType, $name)
    {
        $names = $enumType::names();
        $result = false;

        foreach ($names as $item) {
            if ($item === $name) {
                $result = true;
                break;
            }
        }

        return $result;
    }