mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-23 16:12:11 +02:00
[Nostromo] Scrutinizer recommendations
This commit is contained in:
parent
7506140b6f
commit
c9ac6f60ae
|
@ -53,7 +53,7 @@ class DeployCommand extends AbstractCommand
|
|||
*
|
||||
* @param InputInterface $input
|
||||
* @param OutputInterface $output
|
||||
* @return int|mixed
|
||||
* @return integer
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
|
|
|
@ -189,7 +189,7 @@ class Runtime
|
|||
/**
|
||||
* Retrieves the Configuration options for a specific section in the configuration
|
||||
*
|
||||
* @param mixed $key Section name
|
||||
* @param string $key Section name
|
||||
* @param mixed $default Default value
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -236,8 +236,8 @@ class Runtime
|
|||
/**
|
||||
* Overwrites an Environment configuration option
|
||||
*
|
||||
* @param $key
|
||||
* @param $value
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return Runtime
|
||||
*/
|
||||
public function setEnvironmentConfig($key, $value)
|
||||
|
|
|
@ -20,6 +20,12 @@ use Mage\Task\AbstractTask;
|
|||
*/
|
||||
abstract class AbstractFileTask extends AbstractTask
|
||||
{
|
||||
/**
|
||||
* Returns the Task options
|
||||
*
|
||||
* @return array
|
||||
* @throws ErrorException
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$mandatory = $this->getParameters();
|
||||
|
@ -33,8 +39,20 @@ abstract class AbstractFileTask extends AbstractTask
|
|||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mandatory parameters
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getParameters();
|
||||
|
||||
/**
|
||||
* Returns a file with the placeholders replaced
|
||||
*
|
||||
* @param string $file
|
||||
* @return string
|
||||
* @throws ErrorException
|
||||
*/
|
||||
protected function getFile($file)
|
||||
{
|
||||
$mapping = [
|
||||
|
|
|
@ -11,12 +11,9 @@
|
|||
namespace Mage\Tests\Command\BuiltIn\Releases;
|
||||
|
||||
use Mage\Command\BuiltIn\Releases\ListCommand;
|
||||
use Mage\Runtime\Exception\DeploymentException;
|
||||
use Mage\Runtime\Exception\RuntimeException;
|
||||
use Mage\Command\AbstractCommand;
|
||||
use Mage\Tests\MageApplicationMockup;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Exception;
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class ListCommandTest extends TestCase
|
||||
|
|
|
@ -12,10 +12,8 @@ namespace Mage\Tests\Command\BuiltIn\Releases;
|
|||
|
||||
use Mage\Command\BuiltIn\Releases\RollbackCommand;
|
||||
use Mage\Command\AbstractCommand;
|
||||
use Mage\Runtime\Exception\DeploymentException;
|
||||
use Mage\Tests\MageApplicationMockup;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Exception;
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class RollbackCommandTest extends TestCase
|
||||
|
|
|
@ -63,7 +63,7 @@ class Utils
|
|||
public function getReleaseDate($releaseId)
|
||||
{
|
||||
$formatted = sprintf('%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d',
|
||||
$releaseId[0], $releaseId[1], $releaseId[2], $releaseId[3],
|
||||
$releaseId[0], $releaseId[1], $releaseId[2], $releaseId[3],
|
||||
$releaseId[4], $releaseId[5],
|
||||
$releaseId[6], $releaseId[7],
|
||||
$releaseId[8], $releaseId[9],
|
||||
|
|
Loading…
Reference in a new issue