src/Task/Composer/AbstractComposerCommandTask.php
protected function attachComposerFactory(BaseCommand $command)
    {
        if (!method_exists($command, 'setComposerFactory')) {
            throw new \InvalidArgumentException('The passed command does not implement method setComposerFactory()');
        }

        /** @var WrappedCommandTrait $command */
        $command->setComposerFactory(
            function () {
                return Factory::create($this->getIO());
            }
        );

        return $command;
    }
protected function attachComposerFactory(BaseCommand $command)
    {
        if (!method_exists($command, 'setComposerFactory')) {
            throw new \InvalidArgumentException('The passed command does not implement method setComposerFactory()');
        }

        /** @var WrappedCommandTrait $command */
        $command->setComposerFactory(
            function () {
                return Factory::create($this->getIO());
            }
        );

        return $command;
    }
protected function attachComposerFactory ( BaseCommand $ command ) { if ( ! method_exists ( $ command , 'setComposerFactory' ) ) { throw new \ InvalidArgumentException ( 'The passed command does not implement method setComposerFactory()' ) ; } /** @var WrappedCommandTrait $command */ $ command -> setComposerFactory ( function ( ) { return Factory :: create ( $ this -> getIO ( ) ) ; } ) ; return $ command ; }
Attach the composer factory to the command.

@param BaseCommand $command The command to patch.

@return BaseCommand

@throws \InvalidArgumentException When no setComposerFactory method is declared.
Attach the composer factory to the command .