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);
    }
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);
    }
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 ) ; }
Update settings with a new array

@param array $newSettings
Update settings with a new array