Relocated the run() method to the task base class instead of having it reflected on each task object.
This commit is contained in:
@@ -49,6 +49,20 @@ abstract class Base extends BaseTask
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = $this->getCommand();
|
||||||
|
$this->printTaskInfo(
|
||||||
|
'Running Docker-Compose: {command}',
|
||||||
|
['command' => $command]
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this->executeCommand($command);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get docker-compose command.
|
* Get docker-compose command.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -60,15 +60,4 @@ class Down extends Base
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
$command = $this->getCommand();
|
|
||||||
$this->printTaskInfo('Docker Down: {command}', ['command' => $command]);
|
|
||||||
|
|
||||||
return $this->executeCommand($command);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,17 +147,6 @@ class Up extends Base
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
$command = $this->getCommand();
|
|
||||||
$this->printTaskInfo('Docker Up: {command}', ['command' => $command]);
|
|
||||||
|
|
||||||
return $this->executeCommand($command);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user