Relocated the run() method to the task base class instead of having it reflected on each task object.

This commit is contained in:
Travis Tomka
2017-03-15 13:44:17 -06:00
parent b0c126c271
commit 859431cdda
3 changed files with 14 additions and 22 deletions

View File

@@ -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.
*

View File

@@ -60,15 +60,4 @@ class Down extends Base
return $this;
}
/**
* {@inheritdoc}
*/
public function run()
{
$command = $this->getCommand();
$this->printTaskInfo('Docker Down: {command}', ['command' => $command]);
return $this->executeCommand($command);
}
}

View File

@@ -147,17 +147,6 @@ class Up extends Base
return $this;
}
/**
* {@inheritdoc}
*/
public function run()
{
$command = $this->getCommand();
$this->printTaskInfo('Docker Up: {command}', ['command' => $command]);
return $this->executeCommand($command);
}
/**
* {@inheritdoc}
*/