[Nostromo] Improve code

This commit is contained in:
Andrés Montañez
2017-01-07 02:28:46 -03:00
parent 6d708c35fa
commit 063b75c0ef
2 changed files with 16 additions and 16 deletions
+16
View File
@@ -10,6 +10,7 @@
namespace Mage\Command;
use Mage\Utils;
use Mage\Runtime\Runtime;
use Psr\Log\LogLevel;
use Symfony\Component\Console\Command\Command;
@@ -21,6 +22,11 @@ use Symfony\Component\Console\Command\Command;
*/
abstract class AbstractCommand extends Command
{
/**
* @var int
*/
protected $statusCode = 0;
/**
* @var Runtime Current Runtime instance
*/
@@ -49,4 +55,14 @@ abstract class AbstractCommand extends Command
{
$this->runtime->log($message, $level);
}
/**
* Get the Human friendly Stage name
*
* @return string
*/
protected function getStageName()
{
return Utils::getStageName($this->runtime->getStage());
}
}