private function niceMerge(array &$source, array &$destination): array
    {
        $merged = $source;

        foreach ($destination as $key => &$value) {
            if (
                    $this->mergeRecursive &&
                    isset($merged[$key]) &&
                    is_array($merged[$key])
            ) {
                $merged[$key] = $this->niceMerge($source[$key], $value);
                continue;
            }

            $merged[$key] = $value;
        }

        return $merged;
    }