[Nostromo] Remove Static calls. Mess Detector recommendation.

This commit is contained in:
Andrés Montañez
2017-01-07 21:17:14 -03:00
parent 93af5ee8cc
commit 9f74c3f431
4 changed files with 28 additions and 23 deletions
+2 -1
View File
@@ -63,6 +63,7 @@ abstract class AbstractCommand extends Command
*/
protected function getStageName()
{
return Utils::getStageName($this->runtime->getStage());
$utils = new Utils();
return $utils->getStageName($this->runtime->getStage());
}
}
@@ -51,6 +51,7 @@ class ListCommand extends AbstractCommand
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$utils = new Utils();
$output->writeln('Starting <fg=blue>Magallanes</>');
$output->writeln('');
@@ -114,12 +115,12 @@ class ListCommand extends AbstractCommand
$output->writeln(sprintf(' Releases on host <fg=black;options=bold>%s</>:', $host));
foreach ($releases as $releaseId) {
$releaseDate = Utils::getReleaseDate($releaseId);
$releaseDate = $utils->getReleaseDate($releaseId);
$output->write(sprintf(' Release ID: <fg=magenta>%s</> - Date: <fg=black;options=bold>%s</> [%s]',
$releaseId,
$releaseDate->format('Y-m-d H:i:s'),
Utils::getTimeDiff($releaseDate)
$utils->getTimeDiff($releaseDate)
));
if ($releaseId == $currentReleaseId) {