public function mergeSettings($newSettings)
    {
        if (\is_object($this->getSettings())) {
            $settingsClass = \get_class($this->getSettings());
            $settings = $settingsClass::createFromArray($newSettings, $this->getSettings());
        } else {
            $settings = \array_replace($this->getSettings(), $newSettings);
        }

        $this->setSettings($settings);
    }