From 1b2188f0b134aef76b36ce5b132700dcb8770695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Fri, 13 Jun 2014 09:31:53 -0300 Subject: [PATCH] Tweaks. --- Mage/Command/Factory.php | 3 ++- Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php | 1 - Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Mage/Command/Factory.php b/Mage/Command/Factory.php index 7e6b322..da87189 100644 --- a/Mage/Command/Factory.php +++ b/Mage/Command/Factory.php @@ -33,13 +33,14 @@ class Factory public static function get($commandName, Config $config) { $instance = null; - $commandName = ucwords(str_replace('-', ' ', $commandName)); + $commandName = ucwords(str_replace('-', ' ', $commandName)); $commandName = str_replace(' ', '', $commandName); $commandName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $commandName))); $className = 'Mage\\Command\\BuiltIn\\' . $commandName . 'Command'; if (Autoload::isLoadable($className)) { $instance = new $className; + assert($instance instanceOf AbstractCommand); $instance->setConfig($config); } else { throw new Exception('Command not found.'); diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php index 79a2e87..23585c9 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php @@ -10,7 +10,6 @@ namespace Mage\Task\BuiltIn\Deployment\Strategy; -use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract; use Mage\Task\Releases\IsReleaseAware; /** diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php index eae35bb..7c74113 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php @@ -10,7 +10,6 @@ namespace Mage\Task\BuiltIn\Deployment\Strategy; -use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract; use Mage\Task\Releases\IsReleaseAware; /**