protected function mergeRequires(
        $type,
        RootPackageInterface $root,
        PluginState $state
    ) {
        $linkType = BasePackage::$supportedLinkTypes[$type];
        $getter = 'get' . ucfirst($linkType['method']);
        $setter = 'set' . ucfirst($linkType['method']);

        $requires = $this->package->{$getter}();
        if (empty($requires)) {
            return;
        }

        $this->mergeStabilityFlags($root, $requires);

        $requires = $this->replaceSelfVersionDependencies(
            $type,
            $requires,
            $root
        );

        $root->{$setter}($this->mergeOrDefer(
            $type,
            $root->{$getter}(),
            $requires,
            $state
        ));
    }
protected function mergeRequires(
        $type,
        RootPackageInterface $root,
        PluginState $state
    ) {
        $linkType = BasePackage::$supportedLinkTypes[$type];
        $getter = 'get' . ucfirst($linkType['method']);
        $setter = 'set' . ucfirst($linkType['method']);

        $requires = $this->package->{$getter}();
        if (empty($requires)) {
            return;
        }

        $this->mergeStabilityFlags($root, $requires);

        $requires = $this->replaceSelfVersionDependencies(
            $type,
            $requires,
            $root
        );

        $root->{$setter}($this->mergeOrDefer(
            $type,
            $root->{$getter}(),
            $requires,
            $state
        ));
    }
protected function mergeRequires ( $ type , RootPackageInterface $ root , PluginState $ state ) { $ linkType = BasePackage :: $ supportedLinkTypes [ $ type ] ; $ getter = 'get' . ucfirst ( $ linkType [ 'method' ] ) ; $ setter = 'set' . ucfirst ( $ linkType [ 'method' ] ) ; $ requires = $ this -> package -> { $ getter } ( ) ; if ( empty ( $ requires ) ) { return ; } $ this -> mergeStabilityFlags ( $ root , $ requires ) ; $ requires = $ this -> replaceSelfVersionDependencies ( $ type , $ requires , $ root ) ; $ root -> { $ setter } ( $ this -> mergeOrDefer ( $ type , $ root -> { $ getter } ( ) , $ requires , $ state ) ) ; }
Merge require or require-dev into a RootPackageInterface

@param string $type 'require' or 'require-dev'
@param RootPackageInterface $root
@param PluginState $state
Merge require or require - dev into a RootPackageInterface