public static function merge(array $new, array $old): array
    {
        if (isset($new['domain'])) {
            unset($old['domain']);
        }

        $new = \array_merge(static::formatAs($new, $old), [
            'namespace' => static::formatNamespace($new, $old),
            'prefix'    => static::formatGroupPrefix($new, $old),
            'where'     => static::formatWhere($new, $old),
            'suffix'    => static::formatGroupSuffix($new, $old),
        ]);

        foreach (['namespace', 'prefix', 'suffix', 'where', 'as'] as $name) {
            if (isset($old[$name])) {
                unset($old[$name]);
            }
        }

        return \array_merge_recursive($old, $new);
    }