src/Service.php
public function setConfig(ConfigInterface $config)
    {
        // get keys & flip
        $configKeys = array_flip($config->keys());
        // put default config
        foreach ($this->defaultConfiguration as $key => $value) {
            if (!isset($configKeys[$key])) {
                $config->set($key, $value);
            }
        }

        $this->config = $config;
    }
public function setConfig(ConfigInterface $config)
    {
        // get keys & flip
        $configKeys = array_flip($config->keys());
        // put default config
        foreach ($this->defaultConfiguration as $key => $value) {
            if (!isset($configKeys[$key])) {
                $config->set($key, $value);
            }
        }

        $this->config = $config;
    }
public function setConfig ( ConfigInterface $ config ) { // get keys & flip $ configKeys = array_flip ( $ config -> keys ( ) ) ; // put default config foreach ( $ this -> defaultConfiguration as $ key => $ value ) { if ( ! isset ( $ configKeys [ $ key ] ) ) { $ config -> set ( $ key , $ value ) ; } } $ this -> config = $ config ; }
Set config object
Behavior this will be override your current configuration

@param ConfigInterface $config
Set config object Behavior this will be override your current configuration