public
    static function mergeSettings(
        $generalSettings,
        $environmentSettings
    ) {
        $mergedSettings = $generalSettings;

        foreach ($environmentSettings as $key => &$value) {
            if (
                is_array($value)
                && isset($mergedSettings[$key])
                && is_array($mergedSettings [$key])
            ) {
                $mergedSettings[$key] = self::mergeSettings($mergedSettings[$key], $value);
            } else {
                $mergedSettings[$key] = $value;
            }
        }

        return $mergedSettings;
    }