PHPStorm refactoring.

This commit is contained in:
Andrés Montañez
2014-08-06 14:01:39 -03:00
parent 4c584b2634
commit fddeebe59a
48 changed files with 2011 additions and 1996 deletions
+36 -36
View File
@@ -21,10 +21,10 @@ use Mage\Console;
class InitCommand extends AbstractCommand
{
/**
* Command for Initalize a new Configuration Proyect
* @see \Mage\Command\AbstractCommand::run()
*/
/**
* Command for Initalize a new Configuration Proyect
* @see \Mage\Command\AbstractCommand::run()
*/
public function run()
{
$configDir = getcwd() . '/.mage';
@@ -61,32 +61,32 @@ class InitCommand extends AbstractCommand
*/
protected function getGeneralConfig()
{
// Assamble Global Settings
$projectName = $this->getConfig()->getParameter('name', '');
$notificationEmail = $this->getConfig()->getParameter('email', '');
$notificationEnabled = ($notificationEmail != '') ? 'true' : 'false';
// Assamble Global Settings
$projectName = $this->getConfig()->getParameter('name', '');
$notificationEmail = $this->getConfig()->getParameter('email', '');
$notificationEnabled = ($notificationEmail != '') ? 'true' : 'false';
$globalSettings = str_replace(
array(
'%projectName%',
'%notificationEmail%',
'%notificationEnabled%',
'%loggingEnabled%',
'%maxlogs%',
'%ssh_needs_tty%',
),
array(
$projectName,
$notificationEmail,
$notificationEnabled,
'true',
30,
'false'
),
$this->getGeneralConfigTemplate()
);
$globalSettings = str_replace(
array(
'%projectName%',
'%notificationEmail%',
'%notificationEnabled%',
'%loggingEnabled%',
'%maxlogs%',
'%ssh_needs_tty%',
),
array(
$projectName,
$notificationEmail,
$notificationEnabled,
'true',
30,
'false'
),
$this->getGeneralConfigTemplate()
);
return $globalSettings;
return $globalSettings;
}
/**
@@ -95,14 +95,14 @@ class InitCommand extends AbstractCommand
*/
protected function getGeneralConfigTemplate()
{
$template = '# global settings' . PHP_EOL
. 'name: %projectName%' . PHP_EOL
. 'email: %notificationEmail%' . PHP_EOL
. 'notifications: %notificationEnabled%' . PHP_EOL
. 'logging: %loggingEnabled%' . PHP_EOL
. 'maxlogs: %maxlogs%' . PHP_EOL
. 'ssh_needs_tty: %ssh_needs_tty%' . PHP_EOL;
$template = '# global settings' . PHP_EOL
. 'name: %projectName%' . PHP_EOL
. 'email: %notificationEmail%' . PHP_EOL
. 'notifications: %notificationEnabled%' . PHP_EOL
. 'logging: %loggingEnabled%' . PHP_EOL
. 'maxlogs: %maxlogs%' . PHP_EOL
. 'ssh_needs_tty: %ssh_needs_tty%' . PHP_EOL;
return $template;
return $template;
}
}