SensioLabs Insight.

This commit is contained in:
Andrés Montañez 2015-02-21 14:23:24 -02:00
parent 00edf87862
commit dc18a91cf7
4 changed files with 26 additions and 37 deletions

View file

@ -159,7 +159,7 @@ class PermissionsTask extends AbstractTask
);
foreach($options as $option => $apply) {
if ($apply == true) {
if ($apply === true) {
$optionsForCmd .= $option;
}
}
@ -192,7 +192,7 @@ class PermissionsTask extends AbstractTask
*/
protected function setPaths(array $paths)
{
if ($this->checkPathsExist == true) {
if ($this->checkPathsExist === true) {
$commands = array();
foreach ($paths as $path) {
$commands[] = '(([ -f ' . $path . ' ]) || ([ -d ' . $path . ' ]))';
@ -241,8 +241,6 @@ class PermissionsTask extends AbstractTask
/**
* Set owner.
*
* @todo check existance of $owner on host, might be different ways depending on OS.
*
* @param string $owner
* @return PermissionsTask
*/
@ -264,8 +262,6 @@ class PermissionsTask extends AbstractTask
/**
* Set group.
*
* @todo check existance of $group on host, might be different ways depending on OS.
*
* @param string $group
* @return PermissionsTask
*/
@ -287,8 +283,6 @@ class PermissionsTask extends AbstractTask
/**
* Set rights.
*
* @todo check if $rights is in a correct format.
*
* @param string $rights
* @return PermissionsTask
*/

View file

@ -33,7 +33,6 @@ use Mage\Task\ErrorWithMessageException;
*
* Example enviroment.yaml file at end
*
* @todo add support for creating license files.
*
* (c) ActWeb 2013
* (c) Matt Lowe (marl.scot.1@googlemail.com)
@ -202,7 +201,7 @@ class EncryptTask extends AbstractTask
/*
* Get all our IonCube config options
*/
$this->_getAllIonCubeConfigs();
$this->getAllIonCubeConfigs();
/*
* get the source code location
*/
@ -279,7 +278,7 @@ class EncryptTask extends AbstractTask
*
* @return void
*/
private function _getAllIonCubeConfigs()
private function getAllIonCubeConfigs()
{
/*
@ -553,7 +552,6 @@ class EncryptTask extends AbstractTask
* D - Default options as stored in script
*
* more options could be added to make this a bit more flexable
* @todo I'm sure this could be combined into a loop to make it easier and shorter
*
*/
$s = array();

View file

@ -59,8 +59,6 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$result = $this->runCommandRemote('ls -1 ' . $releasesDirectory, $output);
$releases = ($output == '') ? array() : explode(PHP_EOL, $output);
$inDeploy = $this->getParameter('inDeploy',false);
if (count($releases) == 0) {
Console::output('Release are not available for <bold>' . $this->getConfig()->getHost() . '</bold> ... <red>FAIL</red>');

View file

@ -1,23 +1,22 @@
<?php
namespace Task;
use Mage\Task\AbstractTask;
use Mage\Task\Releases\RollbackAware;
class SampleTaskRollbackAware extends AbstractTask implements RollbackAware
{
public function getName()
{
if ($this->inRollback()) {
return 'A Sample Task aware of rollbacks [in rollback]';
} else {
return 'A Sample Task aware of rollbacks [not in rollback]';
}
}
public function run()
{
return true;
}
}
<?php
namespace Task;
use Mage\Task\AbstractTask;
use Mage\Task\Releases\RollbackAware;
class SampleTaskRollbackAware extends AbstractTask implements RollbackAware
{
public function getName()
{
if ($this->inRollback()) {
return 'A Sample Task aware of rollbacks [in rollback]';
} else {
return 'A Sample Task aware of rollbacks [not in rollback]';
}
}
public function run()
{
return true;
}
}