Browse Source

SensioLabs Insight fixes

1.0
Andrés Montañez 10 years ago
parent
commit
ce60a706ac
  1. 3
      Mage/Command/Factory.php
  2. 2
      Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php

3
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.');
}

2
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'), '/')

Loading…
Cancel
Save