public static function convert(array $arr)
    {
        $converted = [];
        foreach ($arr as $key => $value) {
            $keys = explode('.', $key);
            $tmp =& $converted;
            foreach ($keys as $k) {
                if (!array_key_exists($k, $tmp) || !is_array($tmp[$k])) {
                    $tmp[$k] = [];
                }

                $tmp =& $tmp[$k];
            }

            $tmp = is_array($value) ? static::convert($value) : $value;
        }

        return $converted;
    }