From ce60a706ac49e041b73eeba5fb6ff7910f270235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Sun, 12 Apr 2015 16:15:46 -0300 Subject: [PATCH] SensioLabs Insight fixes --- Mage/Command/Factory.php | 3 --- Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Mage/Command/Factory.php b/Mage/Command/Factory.php index cc3f7f3..777c24e 100644 --- a/Mage/Command/Factory.php +++ b/Mage/Command/Factory.php @@ -42,17 +42,14 @@ class Factory // try a custom command $className = 'Command\\' . $commandName; - // TODO use a custom exception if (!class_exists($className)) { throw new Exception('Command "' . $commandName . '" not found.'); } } /** @var AbstractCommand $instance */ - // TODO dependencies like $config should be injected into constructor $instance = new $className; if (! $instance instanceof AbstractCommand) { - // TODO use a custom exception throw new Exception('The command ' . $commandName . ' must be an instance of Mage\Command\AbstractCommand.'); } diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php index 801fa73..44a25be 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php @@ -36,7 +36,7 @@ class GitRebaseTask extends BaseStrategyTaskAbstract implements IsReleaseAware { $this->checkOverrideRelease(); - if ($this->getConfig()->release('enabled', false) == true) { + if ($this->getConfig()->release('enabled', false) === true) { $releasesDirectory = $this->getConfig()->release('directory', 'releases'); $deployToDirectory = rtrim($this->getConfig()->deployment('to'), '/')