public function __construct($name = null) { $this->definition = new InputDefinition(); if (null !== $name) { $this->setName($name); } $this->configure(); if (!$this->name) { throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); } }
/** * @param TransferFunds $useCase * @param EwalletExtension $formatter */ public function __construct(TransferFunds $useCase, MemberFormatter $formatter) { parent::__construct(); $this->formatter = $formatter; $this->useCase = $useCase; $this->useCase->attach($this); }