public function merge(Plugin $newPlugin)
    {
        if ($newPlugin->getNamespace() !== $this->getNamespace()) {
            throw new RuntimeException('Both plugins cannot be merged');
        }

        $this
            ->configuration
            ->merge($newPlugin->getConfiguration());

        return $this;
    }
public function merge(Plugin $newPlugin)
    {
        if ($newPlugin->getNamespace() !== $this->getNamespace()) {
            throw new RuntimeException('Both plugins cannot be merged');
        }

        $this
            ->configuration
            ->merge($newPlugin->getConfiguration());

        return $this;
    }
public function merge ( Plugin $ newPlugin ) { if ( $ newPlugin -> getNamespace ( ) !== $ this -> getNamespace ( ) ) { throw new RuntimeException ( 'Both plugins cannot be merged' ) ; } $ this -> configuration -> merge ( $ newPlugin -> getConfiguration ( ) ) ; return $ this ; }
Merge this plugin instance with a new one, and saves the result in
this instance.

This method will give priority to its own properties values.

@param Plugin $newPlugin New plugin configuration

@return $this Self object
Merge this plugin instance with a new one and saves the result in this instance .