mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01: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 InputInterface $input
 | 
				
			||||||
     * @param OutputInterface $output
 | 
					     * @param OutputInterface $output
 | 
				
			||||||
     * @return int|mixed
 | 
					     * @return integer
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    protected function execute(InputInterface $input, OutputInterface $output)
 | 
					    protected function execute(InputInterface $input, OutputInterface $output)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
@ -189,7 +189,7 @@ class Runtime
 | 
				
			|||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Retrieves the Configuration options for a specific section in the configuration
 | 
					     * 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
 | 
					     * @param mixed $default Default value
 | 
				
			||||||
     * @return mixed
 | 
					     * @return mixed
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
@ -236,8 +236,8 @@ class Runtime
 | 
				
			|||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Overwrites an Environment configuration option
 | 
					     * Overwrites an Environment configuration option
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param $key
 | 
					     * @param string $key
 | 
				
			||||||
     * @param $value
 | 
					     * @param mixed $value
 | 
				
			||||||
     * @return Runtime
 | 
					     * @return Runtime
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function setEnvironmentConfig($key, $value)
 | 
					    public function setEnvironmentConfig($key, $value)
 | 
				
			||||||
 | 
				
			|||||||
@ -20,6 +20,12 @@ use Mage\Task\AbstractTask;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
abstract class AbstractFileTask extends AbstractTask
 | 
					abstract class AbstractFileTask extends AbstractTask
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Returns the Task options
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return array
 | 
				
			||||||
 | 
					     * @throws ErrorException
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    protected function getOptions()
 | 
					    protected function getOptions()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $mandatory = $this->getParameters();
 | 
					        $mandatory = $this->getParameters();
 | 
				
			||||||
@ -33,8 +39,20 @@ abstract class AbstractFileTask extends AbstractTask
 | 
				
			|||||||
        return $this->options;
 | 
					        return $this->options;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Returns the mandatory parameters
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return array
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    abstract protected function getParameters();
 | 
					    abstract protected function getParameters();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Returns a file with the placeholders replaced
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param string $file
 | 
				
			||||||
 | 
					     * @return string
 | 
				
			||||||
 | 
					     * @throws ErrorException
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    protected function getFile($file)
 | 
					    protected function getFile($file)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $mapping = [
 | 
					        $mapping = [
 | 
				
			||||||
 | 
				
			|||||||
@ -11,12 +11,9 @@
 | 
				
			|||||||
namespace Mage\Tests\Command\BuiltIn\Releases;
 | 
					namespace Mage\Tests\Command\BuiltIn\Releases;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Mage\Command\BuiltIn\Releases\ListCommand;
 | 
					use Mage\Command\BuiltIn\Releases\ListCommand;
 | 
				
			||||||
use Mage\Runtime\Exception\DeploymentException;
 | 
					 | 
				
			||||||
use Mage\Runtime\Exception\RuntimeException;
 | 
					 | 
				
			||||||
use Mage\Command\AbstractCommand;
 | 
					use Mage\Command\AbstractCommand;
 | 
				
			||||||
use Mage\Tests\MageApplicationMockup;
 | 
					use Mage\Tests\MageApplicationMockup;
 | 
				
			||||||
use Symfony\Component\Console\Tester\CommandTester;
 | 
					use Symfony\Component\Console\Tester\CommandTester;
 | 
				
			||||||
use Exception;
 | 
					 | 
				
			||||||
use PHPUnit_Framework_TestCase as TestCase;
 | 
					use PHPUnit_Framework_TestCase as TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ListCommandTest extends TestCase
 | 
					class ListCommandTest extends TestCase
 | 
				
			||||||
 | 
				
			|||||||
@ -12,10 +12,8 @@ namespace Mage\Tests\Command\BuiltIn\Releases;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use Mage\Command\BuiltIn\Releases\RollbackCommand;
 | 
					use Mage\Command\BuiltIn\Releases\RollbackCommand;
 | 
				
			||||||
use Mage\Command\AbstractCommand;
 | 
					use Mage\Command\AbstractCommand;
 | 
				
			||||||
use Mage\Runtime\Exception\DeploymentException;
 | 
					 | 
				
			||||||
use Mage\Tests\MageApplicationMockup;
 | 
					use Mage\Tests\MageApplicationMockup;
 | 
				
			||||||
use Symfony\Component\Console\Tester\CommandTester;
 | 
					use Symfony\Component\Console\Tester\CommandTester;
 | 
				
			||||||
use Exception;
 | 
					 | 
				
			||||||
use PHPUnit_Framework_TestCase as TestCase;
 | 
					use PHPUnit_Framework_TestCase as TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RollbackCommandTest extends TestCase
 | 
					class RollbackCommandTest extends TestCase
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user