diff --git a/Mage/Command/AbstractCommand.php b/Mage/Command/AbstractCommand.php index dcca907..051564b 100644 --- a/Mage/Command/AbstractCommand.php +++ b/Mage/Command/AbstractCommand.php @@ -22,13 +22,13 @@ abstract class AbstractCommand /** * Instance of the loaded Configuration. * - * @var Mage\Config + * @var \Mage\Config */ protected $config = null; /** * Runs the Command - * @throws Exception + * @throws \Exception */ public abstract function run(); diff --git a/Mage/Command/BuiltIn/DeployCommand.php b/Mage/Command/BuiltIn/DeployCommand.php index 5f4f39c..63afdfb 100644 --- a/Mage/Command/BuiltIn/DeployCommand.php +++ b/Mage/Command/BuiltIn/DeployCommand.php @@ -456,7 +456,6 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment $runTask = false; } - $result = false; if ($runTask == true) { try { $result = $task->run(); diff --git a/Mage/Compiler.php b/Mage/Compiler.php index 729ef48..3c9f4ed 100644 --- a/Mage/Compiler.php +++ b/Mage/Compiler.php @@ -39,7 +39,7 @@ class Compiler $phar->startBuffering(); $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__), RecursiveIteratorIterator::CHILD_FIRST); - /** @var $path SplFileInfo */ + /** @var $path \SplFileInfo */ foreach ($iterator as $path) { if ($path->isFile()) { $phar->addFromString(str_replace(dirname(__DIR__).'/', '', $path->getPathname()), file_get_contents($path)); diff --git a/Mage/Config.php b/Mage/Config.php index 8329f2d..2050a86 100644 --- a/Mage/Config.php +++ b/Mage/Config.php @@ -255,9 +255,8 @@ class Config if (isset($config[$configStage])) { $tasksData = ($config[$configStage] ? (array) $config[$configStage] : array()); - foreach ($tasksData as $taskName => $taskData) { + foreach ($tasksData as $taskData) { if (is_array($taskData)) { - ; $tasks[] = array( 'name' => key($taskData), 'parameters' => current($taskData), diff --git a/Mage/Console.php b/Mage/Console.php index 293e47f..04eade8 100644 --- a/Mage/Console.php +++ b/Mage/Console.php @@ -26,7 +26,7 @@ class Console { /** * Handler to the current Log File. - * @var handler + * @var mixed */ private static $log = null; @@ -56,7 +56,7 @@ class Console /** * Configuration - * @var Mage/Config + * @var \Mage\Config */ private static $config; diff --git a/Mage/Task/BuiltIn/Filesystem/LinkSharedFilesTask.php b/Mage/Task/BuiltIn/Filesystem/LinkSharedFilesTask.php index 9850401..6d33e10 100644 --- a/Mage/Task/BuiltIn/Filesystem/LinkSharedFilesTask.php +++ b/Mage/Task/BuiltIn/Filesystem/LinkSharedFilesTask.php @@ -21,7 +21,7 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware * Runs the task * * @return boolean - * @throws Exception + * @throws \Exception * @throws \Mage\Task\ErrorWithMessageException * @throws SkipException */ diff --git a/Mage/Task/BuiltIn/Ioncube/EncryptTask.php b/Mage/Task/BuiltIn/Ioncube/EncryptTask.php index 2e2b73c..f14fbad 100644 --- a/Mage/Task/BuiltIn/Ioncube/EncryptTask.php +++ b/Mage/Task/BuiltIn/Ioncube/EncryptTask.php @@ -321,7 +321,7 @@ class EncryptTask extends AbstractTask * * @see \Mage\Task\AbstractTask::run() * - * @return boolan + * @return bool * @throws \Mage\Task\ErrorWithMessageException */ public function run() { diff --git a/Mage/Task/BuiltIn/Releases/ListTask.php b/Mage/Task/BuiltIn/Releases/ListTask.php index 6174900..c70fdbf 100644 --- a/Mage/Task/BuiltIn/Releases/ListTask.php +++ b/Mage/Task/BuiltIn/Releases/ListTask.php @@ -37,7 +37,7 @@ class ListTask extends AbstractTask implements IsReleaseAware if ($this->getConfig()->release('enabled', false) == true) { $releasesDirectory = $this->getConfig()->release('directory', 'releases'); $symlink = $this->getConfig()->release('symlink', 'current'); - + Console::output('Releases available on ' . $this->getConfig()->getHost() . ''); // Get Releases @@ -46,7 +46,7 @@ class ListTask extends AbstractTask implements IsReleaseAware $releases = ($output == '') ? array() : explode(PHP_EOL, $output); // Get Current - $result = $this->runCommandRemote('ls -l ' . $symlink, $output); + $result = $this->runCommandRemote('ls -l ' . $symlink, $output) && $result; $currentRelease = explode('/', $output); $currentRelease = trim(array_pop($currentRelease)); diff --git a/Mage/Task/BuiltIn/Scm/ChangeBranchTask.php b/Mage/Task/BuiltIn/Scm/ChangeBranchTask.php index 7cfa5d5..9d5ea7e 100644 --- a/Mage/Task/BuiltIn/Scm/ChangeBranchTask.php +++ b/Mage/Task/BuiltIn/Scm/ChangeBranchTask.php @@ -87,7 +87,7 @@ class ChangeBranchTask extends AbstractTask $branch = $this->getParameter('branch', $scmData['branch']); $command = 'git checkout ' . $branch; - $result = $this->runCommandLocal($command); + $result = $this->runCommandLocal($command) && $result; self::$startingBranch = $currentBranch; } else {