public function getComposer($required = true, $disablePlugins = false)
    {
        if (null === $this->composer) {
            if ($this->composerFactory) {
                $this->composer = call_user_func($this->composerFactory, $required, $disablePlugins);
            }

            if ($required && !$this->composer) {
                throw new \RuntimeException(
                    'You must define a factory closure for wrapped commands to retrieve the ' .
                    'composer instance.'
                );
            }
        }

        return $this->composer;
    }
public function getComposer($required = true, $disablePlugins = false)
    {
        if (null === $this->composer) {
            if ($this->composerFactory) {
                $this->composer = call_user_func($this->composerFactory, $required, $disablePlugins);
            }

            if ($required && !$this->composer) {
                throw new \RuntimeException(
                    'You must define a factory closure for wrapped commands to retrieve the ' .
                    'composer instance.'
                );
            }
        }

        return $this->composer;
    }
public function getComposer ( $ required = true , $ disablePlugins = false ) { if ( null === $ this -> composer ) { if ( $ this -> composerFactory ) { $ this -> composer = call_user_func ( $ this -> composerFactory , $ required , $ disablePlugins ) ; } if ( $ required && ! $ this -> composer ) { throw new \ RuntimeException ( 'You must define a factory closure for wrapped commands to retrieve the ' . 'composer instance.' ) ; } } return $ this -> composer ; }
Retrieve the composer instance.

@param bool $required       Flag if the instance is required.

@param bool $disablePlugins Flag if plugins shall get disabled.

@return Composer|null

@throws \RuntimeException When no factory closure has been set.
Retrieve the composer instance .