diff --git a/Mage/Command/BuiltIn/DeployCommand.php b/Mage/Command/BuiltIn/DeployCommand.php
index d1888b3..3719c49 100644
--- a/Mage/Command/BuiltIn/DeployCommand.php
+++ b/Mage/Command/BuiltIn/DeployCommand.php
@@ -356,7 +356,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
}
// Releasing
- if (self::$deployStatus == self::SUCCEDED && $this->getConfig()->release('enabled', false) == true) {
+ if (self::$deployStatus == self::SUCCEDED && $this->getConfig()->release('enabled', false) === true) {
// Execute the Releases
Console::output('Starting the Releasing');
$completedTasks = 0;
@@ -439,7 +439,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
{
$task->init();
- if ($title == null) {
+ if ($title === null) {
$title = 'Running ' . $task->getName() . ' ... ';
}
Console::output($title, 2, 0);
@@ -449,11 +449,11 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
$runTask = false;
}
- if ($runTask == true) {
+ if ($runTask === true) {
try {
$result = $task->run();
- if ($result == true) {
+ if ($result === true) {
Console::output('OK', 0);
$result = true;
@@ -564,7 +564,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
case self::DEPLOY_STRATEGY_GUESS:
default:
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$deployStrategy = 'deployment/strategy/tar-gz';
} else {
$deployStrategy = 'deployment/strategy/rsync';
diff --git a/Mage/Command/BuiltIn/UpdateCommand.php b/Mage/Command/BuiltIn/UpdateCommand.php
index 9cba1cb..7fa6461 100644
--- a/Mage/Command/BuiltIn/UpdateCommand.php
+++ b/Mage/Command/BuiltIn/UpdateCommand.php
@@ -35,7 +35,7 @@ class UpdateCommand extends AbstractCommand
Console::output('Updating application via ' . $task->getName() . ' ... ', 1, 0);
$result = $task->run();
- if ($result == true) {
+ if ($result === true) {
Console::output('OK' . PHP_EOL, 0);
$exitCode = 0;
diff --git a/Mage/Console.php b/Mage/Console.php
index 6f55e8b..f1d7609 100644
--- a/Mage/Console.php
+++ b/Mage/Console.php
@@ -131,7 +131,7 @@ class Console
$command = Factory::get($commandName, $config);
if ($command instanceOf RequiresEnvironment) {
- if ($config->getEnvironment() == false) {
+ if ($config->getEnvironment() === false) {
throw new Exception('You must specify an environment for this command.');
}
}
@@ -222,7 +222,7 @@ class Console
public static function log($message)
{
if (self::$logEnabled) {
- if (self::$log == null) {
+ if (self::$log === null) {
self::$logFile = realpath(getcwd() . '/.mage/logs') . '/log-' . date('Ymd-His') . '.log';
self::$log = fopen(self::$logFile, 'w');
}
diff --git a/Mage/Task/AbstractTask.php b/Mage/Task/AbstractTask.php
index c61f87d..bc12f5f 100644
--- a/Mage/Task/AbstractTask.php
+++ b/Mage/Task/AbstractTask.php
@@ -181,7 +181,7 @@ abstract class AbstractTask
*/
protected final function runCommandRemote($command, &$output = null, $cdToDirectoryFirst = true)
{
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
if ($this instanceOf IsReleaseAware) {
$releasesDirectory = '';
@@ -238,7 +238,7 @@ abstract class AbstractTask
*/
protected function getReleasesAwareCommand($command)
{
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$deployToDirectory = $releasesDirectory . '/' . $this->getConfig()->getReleaseId();
diff --git a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php
index e44c5d8..ceeab5f 100644
--- a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php
+++ b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php
@@ -37,7 +37,7 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
public function run()
{
$resultFetch = false;
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
@@ -107,7 +107,7 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
protected function cleanUpReleases()
{
// Count Releases
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/BaseStrategyTaskAbstract.php b/Mage/Task/BuiltIn/Deployment/Strategy/BaseStrategyTaskAbstract.php
index 5affe97..9e787c7 100644
--- a/Mage/Task/BuiltIn/Deployment/Strategy/BaseStrategyTaskAbstract.php
+++ b/Mage/Task/BuiltIn/Deployment/Strategy/BaseStrategyTaskAbstract.php
@@ -30,7 +30,7 @@ abstract class BaseStrategyTaskAbstract extends AbstractTask implements IsReleas
$overrideRelease = $this->getParameter('overrideRelease', false);
$symlink = $this->getConfig()->release('symlink', 'current');
- if ($overrideRelease == true) {
+ if ($overrideRelease === true) {
$releaseToOverride = false;
$resultFetch = $this->runCommandRemote('ls -ld ' . $symlink . ' | cut -d"/" -f2', $releaseToOverride);
if ($resultFetch && is_numeric($releaseToOverride)) {
diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/GitRemoteCacheTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/GitRemoteCacheTask.php
index fd0869f..3934e48 100644
--- a/Mage/Task/BuiltIn/Deployment/Strategy/GitRemoteCacheTask.php
+++ b/Mage/Task/BuiltIn/Deployment/Strategy/GitRemoteCacheTask.php
@@ -42,7 +42,7 @@ class GitRemoteCacheTask extends AbstractTask implements IsReleaseAware
{
$overrideRelease = $this->getParameter('overrideRelease', false);
- if ($overrideRelease == true) {
+ if ($overrideRelease === true) {
$releaseToOverride = false;
$resultFetch = $this->runCommandRemote('ls -ld current | cut -d"/" -f2', $releaseToOverride);
if ($resultFetch && is_numeric($releaseToOverride)) {
@@ -63,7 +63,7 @@ class GitRemoteCacheTask extends AbstractTask implements IsReleaseAware
$userExcludes = $this->getConfig()->deployment('excludes', array());
$deployToDirectory = $this->getConfig()->deployment('to');
- 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'), '/')
diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php
index c4c92ad..b7ee1b5 100644
--- a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php
+++ b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php
@@ -27,8 +27,8 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
*/
public function getName()
{
- if ($this->getConfig()->release('enabled', false) == true) {
- if ($this->getConfig()->getParameter('overrideRelease', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
+ if ($this->getConfig()->getParameter('overrideRelease', false) === true) {
return 'Deploy via Rsync (with Releases override) [built-in]';
} else {
$rsync_copy = $this->getConfig()->deployment("rsync");
@@ -55,7 +55,7 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
// If we are working with releases
$deployToDirectory = $this->getConfig()->deployment('to');
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php
index 2077eb7..5607a5d 100644
--- a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php
+++ b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php
@@ -27,8 +27,8 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
*/
public function getName()
{
- if ($this->getConfig()->release('enabled', false) == true) {
- if ($this->getConfig()->getParameter('overrideRelease', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
+ if ($this->getConfig()->getParameter('overrideRelease', false) === true) {
return 'Deploy via TarGz (with Releases override) [built-in]';
} else {
return 'Deploy via TarGz (with Releases) [built-in]';
@@ -50,7 +50,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
// If we are working with releases
$deployToDirectory = $this->getConfig()->deployment('to');
- 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'), '/')
. '/' . $releasesDirectory
diff --git a/Mage/Task/BuiltIn/Releases/ListTask.php b/Mage/Task/BuiltIn/Releases/ListTask.php
index ef88004..3d76327 100644
--- a/Mage/Task/BuiltIn/Releases/ListTask.php
+++ b/Mage/Task/BuiltIn/Releases/ListTask.php
@@ -34,7 +34,7 @@ class ListTask extends AbstractTask implements IsReleaseAware
*/
public function run()
{
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
diff --git a/Mage/Task/BuiltIn/Releases/RollbackTask.php b/Mage/Task/BuiltIn/Releases/RollbackTask.php
index 759c042..eee33c3 100644
--- a/Mage/Task/BuiltIn/Releases/RollbackTask.php
+++ b/Mage/Task/BuiltIn/Releases/RollbackTask.php
@@ -47,7 +47,7 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
*/
public function run()
{
- if ($this->getConfig()->release('enabled', false) == true) {
+ if ($this->getConfig()->release('enabled', false) === true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
@@ -111,7 +111,7 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$tasks++;
$result = $task->run();
- if ($result == true) {
+ if ($result === true) {
Console::output('OK', 0);
$completedTasks++;
} else {
@@ -161,7 +161,7 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$tasks++;
$result = $task->run();
- if ($result == true) {
+ if ($result === true) {
Console::output('OK', 0);
$completedTasks++;
} else {