public function __construct($definedTask)
{
$this->definedTask = $definedTask;
$this->setName($this->definedTask->getName());
parent::__construct();
// Override the command name.
$this->setName($this->definedTask->getName());
// Override the command description.
if ($this->definedTask->hasDescription()) {
$this->setDescription($this->definedTask->getDescription());
}
}
public function __construct($definedTask) { if (!$definedTask->hasClosure()) { throw new \RuntimeException("The task don't have a closure"); } parent::__construct($definedTask); }