public static function fromKey($name)
    {
        foreach (static::values() as $key => $enumInstance) {
            if ($enumInstance->getKey() === $name) {
                return $enumInstance;
            }
        }

        return null;
    }