@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public static function verify(array $options, OutputInterface $output) |
| 16 | 16 | { |
| 17 | - $hostPlugin = `vagrant plugin list | grep vagrant-hostsupdater`; |
|
| 17 | + $hostPlugin=`vagrant plugin list | grep vagrant-hostsupdater`; |
|
| 18 | 18 | if (is_null($hostPlugin)) { |
| 19 | 19 | self::editHostsInstructions($options, $output); |
| 20 | 20 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | protected static function editHostsInstructions(array $options, OutputInterface $output) |
| 30 | 30 | { |
| 31 | 31 | $output->writeln('<comment>NOTE: You will need to add the following to your hosts file!</comment>'); |
| 32 | - $comment = $options['vagrantfile']['vm']['network']['private_network'] . |
|
| 33 | - ' ' . $options['magestead']['apps']['mba_12345']['base_url']; |
|
| 34 | - $output->writeln('<info>' . $comment . '</info>'); |
|
| 32 | + $comment=$options['vagrantfile']['vm']['network']['private_network']. |
|
| 33 | + ' '.$options['magestead']['apps']['mba_12345']['base_url']; |
|
| 34 | + $output->writeln('<info>'.$comment.'</info>'); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | \ No newline at end of file |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | protected function configure() |
| 20 | 20 | { |
| 21 | - $this->_projectPath = getcwd(); |
|
| 21 | + $this->_projectPath=getcwd(); |
|
| 22 | 22 | $this->setName("index:mode:show"); |
| 23 | 23 | $this->setDescription("Show index mode"); |
| 24 | 24 | $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]'); |
@@ -31,12 +31,12 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | protected function execute(InputInterface $input, OutputInterface $output) |
| 33 | 33 | { |
| 34 | - $index = $input->getArgument('index'); |
|
| 34 | + $index=$input->getArgument('index'); |
|
| 35 | 35 | |
| 36 | - $command = $this->getCommand(new Config($output), $index); |
|
| 36 | + $command=$this->getCommand(new Config($output), $index); |
|
| 37 | 37 | if ($command) { |
| 38 | 38 | $output->writeln('<info>Getting index mode</info>'); |
| 39 | - $passedCommand = "vagrant ssh -c '". $command ."'"; |
|
| 39 | + $passedCommand="vagrant ssh -c '".$command."'"; |
|
| 40 | 40 | return new ProcessCommand($passedCommand, $this->_projectPath, $output); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | protected function getCommand(Config $config, $index) |
| 52 | 52 | { |
| 53 | - $type = $config->type; |
|
| 53 | + $type=$config->type; |
|
| 54 | 54 | switch ($type) { |
| 55 | 55 | case 'magento2': |
| 56 | 56 | return "cd /var/www/public;bin/magento indexer:show-mode $index"; |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$file = "$argv[1]/magento2/app/etc/env.php"; |
|
| 4 | -$env = include $file; |
|
| 3 | +$file="$argv[1]/magento2/app/etc/env.php"; |
|
| 4 | +$env=include $file; |
|
| 5 | 5 | |
| 6 | -$env['cache'] = |
|
| 7 | - array ( |
|
| 6 | +$env['cache']= |
|
| 7 | + array( |
|
| 8 | 8 | 'frontend' => |
| 9 | - array ( |
|
| 9 | + array( |
|
| 10 | 10 | 'default' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'backend' => 'Cm_Cache_Backend_Redis', |
| 13 | 13 | 'backend_options' => |
| 14 | - array ( |
|
| 14 | + array( |
|
| 15 | 15 | 'server' => '127.0.0.1', |
| 16 | 16 | 'port' => '6379', |
| 17 | 17 | 'persistent' => '', |
@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | ) |
| 28 | 28 | ), |
| 29 | 29 | 'page_cache' => |
| 30 | - array ( |
|
| 30 | + array( |
|
| 31 | 31 | 'backend' => 'Cm_Cache_Backend_Redis', |
| 32 | 32 | 'backend_options' => |
| 33 | - array ( |
|
| 33 | + array( |
|
| 34 | 34 | 'server' => '127.0.0.1', |
| 35 | 35 | 'port' => '6379', |
| 36 | 36 | 'persistent' => '', |
@@ -48,4 +48,4 @@ discard block |
||
| 48 | 48 | ) |
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | -file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
|
| 51 | +file_put_contents($file, "<?php \n \n return ".var_export($env, true).";"); |
|
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$file = "/home/vagrant/.composer/auth.json"; |
|
| 3 | +$file="/home/vagrant/.composer/auth.json"; |
|
| 4 | 4 | |
| 5 | -$publicKey = "$argv[1]"; |
|
| 6 | -$privateKey = "$argv[2]"; |
|
| 5 | +$publicKey="$argv[1]"; |
|
| 6 | +$privateKey="$argv[2]"; |
|
| 7 | 7 | |
| 8 | -$contents = [ |
|
| 8 | +$contents=[ |
|
| 9 | 9 | "http-basic" => [ |
| 10 | 10 | "repo.magento.com" => [ |
| 11 | 11 | "username" => $publicKey, |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public static function send($message) |
| 18 | 18 | { |
| 19 | - $notifier = NotifierFactory::create(); |
|
| 20 | - $basePath = dirname( __FILE__ ) . '/../../../'; |
|
| 21 | - $notification = |
|
| 19 | + $notifier=NotifierFactory::create(); |
|
| 20 | + $basePath=dirname(__FILE__).'/../../../'; |
|
| 21 | + $notification= |
|
| 22 | 22 | (new Notify()) |
| 23 | 23 | ->setTitle('Magestead') |
| 24 | 24 | ->setBody($message) |
| 25 | - ->setIcon($basePath .'assets/magentologo.png') |
|
| 25 | + ->setIcon($basePath.'assets/magentologo.png') |
|
| 26 | 26 | ; |
| 27 | 27 | |
| 28 | 28 | $notifier->send($notification); |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function __construct($repoUrl, $projectPath, OutputInterface $output) |
| 19 | 19 | { |
| 20 | - $this->_repoUrl = $repoUrl; |
|
| 21 | - $this->_projectPath = $projectPath; |
|
| 22 | - $this->_output = $output; |
|
| 20 | + $this->_repoUrl=$repoUrl; |
|
| 21 | + $this->_projectPath=$projectPath; |
|
| 22 | + $this->_output=$output; |
|
| 23 | 23 | |
| 24 | 24 | $this->execute($output); |
| 25 | 25 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function init() |
| 51 | 51 | { |
| 52 | - $command = 'git init; git remote add origin ' . $this->_repoUrl; |
|
| 52 | + $command='git init; git remote add origin '.$this->_repoUrl; |
|
| 53 | 53 | new ProcessCommand($command, $this->_projectPath, $this->_output); |
| 54 | 54 | |
| 55 | 55 | return $this; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function addFiles() |
| 64 | 64 | { |
| 65 | - $command = 'git add -A'; |
|
| 65 | + $command='git add -A'; |
|
| 66 | 66 | new ProcessCommand($command, $this->_projectPath, $this->_output); |
| 67 | 67 | |
| 68 | 68 | return $this; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function commitFiles() |
| 77 | 77 | { |
| 78 | - $command = "git commit -m 'Initial commit'"; |
|
| 78 | + $command="git commit -m 'Initial commit'"; |
|
| 79 | 79 | new ProcessCommand($command, $this->_projectPath, $this->_output); |
| 80 | 80 | |
| 81 | 81 | return $this; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function pushFiles() |
| 90 | 90 | { |
| 91 | - $command = "git push -u origin master"; |
|
| 91 | + $command="git push -u origin master"; |
|
| 92 | 92 | new ProcessCommand($command, $this->_projectPath, $this->_output); |
| 93 | 93 | |
| 94 | 94 | return $this; |
@@ -48,27 +48,27 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | protected function installMagento(array $options, $projectPath, OutputInterface $output) |
| 50 | 50 | { |
| 51 | - $locale = $options['magestead']['apps']['mba_12345']['locale']; |
|
| 52 | - $db_name = $options['magestead']['apps']['mba_12345']['db_name']; |
|
| 53 | - $base_url = $options['magestead']['apps']['mba_12345']['base_url']; |
|
| 54 | - $default_currency = $options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 51 | + $locale=$options['magestead']['apps']['mba_12345']['locale']; |
|
| 52 | + $db_name=$options['magestead']['apps']['mba_12345']['db_name']; |
|
| 53 | + $base_url=$options['magestead']['apps']['mba_12345']['base_url']; |
|
| 54 | + $default_currency=$options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 55 | 55 | |
| 56 | - $install = 'vagrant ssh -c \'cd /var/www/public; php -f install.php -- \ |
|
| 56 | + $install='vagrant ssh -c \'cd /var/www/public; php -f install.php -- \ |
|
| 57 | 57 | --license_agreement_accepted "yes" \ |
| 58 | ---locale "' . $locale . '" \ |
|
| 58 | +--locale "' . $locale.'" \ |
|
| 59 | 59 | --timezone "Europe/London" \ |
| 60 | ---default_currency "' . $default_currency . '" \ |
|
| 60 | +--default_currency "' . $default_currency.'" \ |
|
| 61 | 61 | --db_host "localhost" \ |
| 62 | ---db_name "' . $db_name . '" \ |
|
| 62 | +--db_name "' . $db_name.'" \ |
|
| 63 | 63 | --db_user "magestead" \ |
| 64 | 64 | --db_pass "vagrant" \ |
| 65 | 65 | --session_save "db" \ |
| 66 | ---url "http://' . $base_url . '/" \ |
|
| 66 | +--url "http://' . $base_url.'/" \ |
|
| 67 | 67 | --use_rewrites "yes" \ |
| 68 | 68 | --skip_url_validation "yes" \ |
| 69 | 69 | --use_secure "no" \ |
| 70 | 70 | --use_secure_admin "no" \ |
| 71 | ---secure_base_url "http://' . $base_url . '/" \ |
|
| 71 | +--secure_base_url "http://' . $base_url.'/" \ |
|
| 72 | 72 | --admin_firstname "RichDynamix" \ |
| 73 | 73 | --admin_lastname "Magestead" \ |
| 74 | 74 | --admin_email "[email protected]" \ |
@@ -88,27 +88,27 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | protected function setPermissions($projectPath, OutputInterface $output) |
| 90 | 90 | { |
| 91 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\''; |
|
| 91 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\''; |
|
| 92 | 92 | $output->writeln('<comment>Setting "var" Files Permissions</comment>'); |
| 93 | 93 | new ProcessCommand($command, $projectPath, $output); |
| 94 | 94 | |
| 95 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\''; |
|
| 95 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\''; |
|
| 96 | 96 | $output->writeln('<comment>Setting "media" Files Permissions</comment>'); |
| 97 | 97 | new ProcessCommand($command, $projectPath, $output); |
| 98 | 98 | |
| 99 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\''; |
|
| 99 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\''; |
|
| 100 | 100 | $output->writeln('<comment>Setting "var" Folder Permissions</comment>'); |
| 101 | 101 | new ProcessCommand($command, $projectPath, $output); |
| 102 | 102 | |
| 103 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\''; |
|
| 103 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\''; |
|
| 104 | 104 | $output->writeln('<comment>Setting "media" Folder Permissions</comment>'); |
| 105 | 105 | new ProcessCommand($command, $projectPath, $output); |
| 106 | 106 | |
| 107 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\''; |
|
| 107 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\''; |
|
| 108 | 108 | $output->writeln('<comment>Setting "includes" Permissions</comment>'); |
| 109 | 109 | new ProcessCommand($command, $projectPath, $output); |
| 110 | 110 | |
| 111 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\''; |
|
| 111 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\''; |
|
| 112 | 112 | $output->writeln('<comment>Setting "includes/config.php" Permissions</comment>'); |
| 113 | 113 | new ProcessCommand($command, $projectPath, $output); |
| 114 | 114 | } |
@@ -119,11 +119,11 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | protected function installMagerun($projectPath, OutputInterface $output) |
| 121 | 121 | { |
| 122 | - $command = 'vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\''; |
|
| 122 | + $command='vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\''; |
|
| 123 | 123 | $output->writeln('<info>Downloading Magerun</info>'); |
| 124 | 124 | new ProcessCommand($command, $projectPath, $output); |
| 125 | 125 | |
| 126 | - $command = 'vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\''; |
|
| 126 | + $command='vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\''; |
|
| 127 | 127 | $output->writeln('<comment>Setting Magerun Permissions</comment>'); |
| 128 | 128 | new ProcessCommand($command, $projectPath, $output); |
| 129 | 129 | } |
@@ -135,21 +135,21 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) |
| 137 | 137 | { |
| 138 | - $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\''; |
|
| 138 | + $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\''; |
|
| 139 | 139 | $output->writeln('<comment>Reindexing Tables</comment>'); |
| 140 | 140 | new ProcessCommand($command, $projectPath, $output); |
| 141 | 141 | |
| 142 | - $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\''; |
|
| 142 | + $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\''; |
|
| 143 | 143 | $output->writeln('<comment>Enabling All Cache</comment>'); |
| 144 | 144 | new ProcessCommand($command, $projectPath, $output); |
| 145 | 145 | |
| 146 | - $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\''; |
|
| 146 | + $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\''; |
|
| 147 | 147 | $output->writeln('<comment>Flushing All Cache</comment>'); |
| 148 | 148 | new ProcessCommand($command, $projectPath, $output); |
| 149 | 149 | |
| 150 | 150 | $this->processVcs($options, $projectPath, $output); |
| 151 | 151 | |
| 152 | - $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\''; |
|
| 152 | + $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\''; |
|
| 153 | 153 | $output->writeln('<comment>System Check</comment>'); |
| 154 | 154 | new ProcessCommand($command, $projectPath, $output); |
| 155 | 155 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | protected function showCredentials(array $options, OutputInterface $output) |
| 162 | 162 | { |
| 163 | 163 | $output->writeln('<info>SUCCESS: Magestead has finished installing Magento!</info>'); |
| 164 | - $table = new Table($output); |
|
| 164 | + $table=new Table($output); |
|
| 165 | 165 | $table |
| 166 | 166 | ->setHeaders(['Username', 'Password', 'Base URL']) |
| 167 | 167 | ->setRows([ |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | protected function processVcs(array $options, $projectPath, OutputInterface $output) |
| 182 | 182 | { |
| 183 | 183 | if (!empty($options['repo_url'])) { |
| 184 | - copy($projectPath . "/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath . "/.gitignore"); |
|
| 184 | + copy($projectPath."/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath."/.gitignore"); |
|
| 185 | 185 | return new VersionControl($options['repo_url'], $projectPath, $output); |
| 186 | 186 | } |
| 187 | 187 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | protected function composerInstall($projectPath, OutputInterface $output) |
| 194 | 194 | { |
| 195 | - copy($projectPath . "/puphpet/magestead/magento/stubs/composer.tmp", $projectPath . "/composer.json"); |
|
| 195 | + copy($projectPath."/puphpet/magestead/magento/stubs/composer.tmp", $projectPath."/composer.json"); |
|
| 196 | 196 | new ProcessCommand('composer install', $projectPath, $output); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -210,30 +210,30 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | protected function updateConfigXml($projectPath) |
| 212 | 212 | { |
| 213 | - $localFile = '/public/app/etc/local.xml'; |
|
| 214 | - $localXml = file_get_contents($projectPath . $localFile); |
|
| 215 | - |
|
| 216 | - $config = new \SimpleXMLElement($localXml); |
|
| 217 | - $config->global[0]->redis_session[0]->host = '127.0.0.1'; |
|
| 218 | - $config->global[0]->redis_session[0]->port = '6379'; |
|
| 219 | - $config->global[0]->redis_session[0]->password = ''; |
|
| 220 | - $config->global[0]->redis_session[0]->timeout = '2.5'; |
|
| 221 | - $config->global[0]->redis_session[0]->persistent = ''; |
|
| 222 | - $config->global[0]->redis_session[0]->db = ''; |
|
| 223 | - $config->global[0]->redis_session[0]->compression_threshold = '2048'; |
|
| 224 | - $config->global[0]->redis_session[0]->compression_lib = 'gzip'; |
|
| 225 | - $config->global[0]->redis_session[0]->log_level = '1'; |
|
| 226 | - $config->global[0]->redis_session[0]->max_concurrency = '6'; |
|
| 227 | - $config->global[0]->redis_session[0]->break_after_frontend = '5'; |
|
| 228 | - $config->global[0]->redis_session[0]->break_after_adminhtml = '30'; |
|
| 229 | - $config->global[0]->redis_session[0]->first_lifetime = '600'; |
|
| 230 | - $config->global[0]->redis_session[0]->bot_first_lifetime = '60'; |
|
| 231 | - $config->global[0]->redis_session[0]->bot_lifetime = '7200'; |
|
| 232 | - $config->global[0]->redis_session[0]->disable_locking = '0'; |
|
| 233 | - $config->global[0]->redis_session[0]->min_lifetime = '60'; |
|
| 234 | - $config->global[0]->redis_session[0]->max_lifetime = '2592000'; |
|
| 235 | - |
|
| 236 | - file_put_contents($projectPath . $localFile, $config->asXML()); |
|
| 213 | + $localFile='/public/app/etc/local.xml'; |
|
| 214 | + $localXml=file_get_contents($projectPath.$localFile); |
|
| 215 | + |
|
| 216 | + $config=new \SimpleXMLElement($localXml); |
|
| 217 | + $config->global[0]->redis_session[0]->host='127.0.0.1'; |
|
| 218 | + $config->global[0]->redis_session[0]->port='6379'; |
|
| 219 | + $config->global[0]->redis_session[0]->password=''; |
|
| 220 | + $config->global[0]->redis_session[0]->timeout='2.5'; |
|
| 221 | + $config->global[0]->redis_session[0]->persistent=''; |
|
| 222 | + $config->global[0]->redis_session[0]->db=''; |
|
| 223 | + $config->global[0]->redis_session[0]->compression_threshold='2048'; |
|
| 224 | + $config->global[0]->redis_session[0]->compression_lib='gzip'; |
|
| 225 | + $config->global[0]->redis_session[0]->log_level='1'; |
|
| 226 | + $config->global[0]->redis_session[0]->max_concurrency='6'; |
|
| 227 | + $config->global[0]->redis_session[0]->break_after_frontend='5'; |
|
| 228 | + $config->global[0]->redis_session[0]->break_after_adminhtml='30'; |
|
| 229 | + $config->global[0]->redis_session[0]->first_lifetime='600'; |
|
| 230 | + $config->global[0]->redis_session[0]->bot_first_lifetime='60'; |
|
| 231 | + $config->global[0]->redis_session[0]->bot_lifetime='7200'; |
|
| 232 | + $config->global[0]->redis_session[0]->disable_locking='0'; |
|
| 233 | + $config->global[0]->redis_session[0]->min_lifetime='60'; |
|
| 234 | + $config->global[0]->redis_session[0]->max_lifetime='2592000'; |
|
| 235 | + |
|
| 236 | + file_put_contents($projectPath.$localFile, $config->asXML()); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | /** |
@@ -241,11 +241,11 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | protected function activateModule($projectPath) |
| 243 | 243 | { |
| 244 | - $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml'; |
|
| 245 | - $moduleXml = file_get_contents($projectPath . $moduleFile); |
|
| 246 | - $config = new \SimpleXMLElement($moduleXml); |
|
| 247 | - $config->modules[0]->Cm_RedisSession[0]->active = 'true'; |
|
| 248 | - file_put_contents($projectPath . $moduleFile, $config->asXML()); |
|
| 244 | + $moduleFile='/public/app/etc/modules/Cm_RedisSession.xml'; |
|
| 245 | + $moduleXml=file_get_contents($projectPath.$moduleFile); |
|
| 246 | + $config=new \SimpleXMLElement($moduleXml); |
|
| 247 | + $config->modules[0]->Cm_RedisSession[0]->active='true'; |
|
| 248 | + file_put_contents($projectPath.$moduleFile, $config->asXML()); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | /** |
@@ -257,10 +257,10 @@ discard block |
||
| 257 | 257 | protected function configureTestSuites(array $options, $projectPath, OutputInterface $output) |
| 258 | 258 | { |
| 259 | 259 | $output->writeln('<info>Configuring PHPSpec & Behat Suites</info>'); |
| 260 | - $progress = new ProgressBar($output, 2); |
|
| 260 | + $progress=new ProgressBar($output, 2); |
|
| 261 | 261 | |
| 262 | 262 | $progress->start(); |
| 263 | - copy($projectPath . "/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath . "/phpspec.yml"); |
|
| 263 | + copy($projectPath."/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath."/phpspec.yml"); |
|
| 264 | 264 | $progress->advance(); |
| 265 | 265 | $progress->advance(); |
| 266 | 266 | // $behat = $this->getBehatConfig($options, $projectPath, $output); |
@@ -279,10 +279,10 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | protected function getBehatConfig(array $options, $projectPath, OutputInterface $output) |
| 281 | 281 | { |
| 282 | - $yaml = new Parser(); |
|
| 282 | + $yaml=new Parser(); |
|
| 283 | 283 | try { |
| 284 | - $behat = $yaml->parse(file_get_contents($projectPath . "/puphpet/magestead/magento/stubs/behat.yml")); |
|
| 285 | - $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url'] = $options['base_url']; |
|
| 284 | + $behat=$yaml->parse(file_get_contents($projectPath."/puphpet/magestead/magento/stubs/behat.yml")); |
|
| 285 | + $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url']=$options['base_url']; |
|
| 286 | 286 | return $behat; |
| 287 | 287 | } catch (ParseException $e) { |
| 288 | 288 | $output->writeln('<error>Unable to parse the YAML config</error>'); |
@@ -299,10 +299,10 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress) |
| 301 | 301 | { |
| 302 | - $dumper = new Dumper(); |
|
| 303 | - $yaml = $dumper->dump($behat, 6); |
|
| 302 | + $dumper=new Dumper(); |
|
| 303 | + $yaml=$dumper->dump($behat, 6); |
|
| 304 | 304 | try { |
| 305 | - file_put_contents($projectPath . '/behat.yml', $yaml); |
|
| 305 | + file_put_contents($projectPath.'/behat.yml', $yaml); |
|
| 306 | 306 | $progress->advance(); |
| 307 | 307 | } catch (\Exception $e) { |
| 308 | 308 | $output->writeln('<error>Unable to write to the YAML file</error>'); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | protected function composerInstall($projectPath, OutputInterface $output) |
| 38 | 38 | { |
| 39 | 39 | $output->writeln('<info>Installing Magento 2 with Composer</info>'); |
| 40 | - $command = 'composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public'; |
|
| 40 | + $command='composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public'; |
|
| 41 | 41 | new ProcessCommand($command, $projectPath, $output); |
| 42 | 42 | |
| 43 | 43 | $this->setComposerBinDir($projectPath); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | protected function addPhpSpecPackage($projectPath, OutputInterface $output) |
| 53 | 53 | { |
| 54 | 54 | $output->writeln('<comment>Installing PHPSpec</comment>'); |
| 55 | - $command = 'cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;'; |
|
| 55 | + $command='cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;'; |
|
| 56 | 56 | new ProcessCommand($command, $projectPath, $output); |
| 57 | 57 | |
| 58 | 58 | $this->setPhpSpecPermissions($projectPath, $output); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | protected function addBehatPackage($projectPath, OutputInterface $output) |
| 66 | 66 | { |
| 67 | 67 | $output->writeln('<comment>Installing Behat</comment>'); |
| 68 | - $command = 'cd '.$projectPath.'/public; composer require behat/behat --dev;'; |
|
| 68 | + $command='cd '.$projectPath.'/public; composer require behat/behat --dev;'; |
|
| 69 | 69 | new ProcessCommand($command, $projectPath, $output); |
| 70 | 70 | |
| 71 | 71 | $this->setBehatPermissions($projectPath, $output); |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | $this->setPermissions($projectPath, $output); |
| 82 | 82 | |
| 83 | 83 | $output->writeln('<info>Installing Magento 2 Software</info>'); |
| 84 | - $locale = $options['magestead']['apps']['mba_12345']['locale']; |
|
| 85 | - $db_name = $options['magestead']['apps']['mba_12345']['db_name']; |
|
| 86 | - $base_url = $options['magestead']['apps']['mba_12345']['base_url']; |
|
| 87 | - $default_currency = $options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 84 | + $locale=$options['magestead']['apps']['mba_12345']['locale']; |
|
| 85 | + $db_name=$options['magestead']['apps']['mba_12345']['db_name']; |
|
| 86 | + $base_url=$options['magestead']['apps']['mba_12345']['base_url']; |
|
| 87 | + $default_currency=$options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 88 | 88 | |
| 89 | - $install = 'vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \ |
|
| 89 | + $install='vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \ |
|
| 90 | 90 | --db-host=localhost \ |
| 91 | 91 | --db-name='.$db_name.' \ |
| 92 | 92 | --db-user=magestead \ |
@@ -113,15 +113,15 @@ discard block |
||
| 113 | 113 | protected function setPermissions($projectPath, OutputInterface $output) |
| 114 | 114 | { |
| 115 | 115 | $output->writeln('<info>Setting Permissions</info>'); |
| 116 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\''; |
|
| 116 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\''; |
|
| 117 | 117 | new ProcessCommand($command, $projectPath, $output); |
| 118 | 118 | $output->writeln('<comment>Folder Permissions Set</comment>'); |
| 119 | 119 | |
| 120 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\''; |
|
| 120 | + $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\''; |
|
| 121 | 121 | new ProcessCommand($command, $projectPath, $output); |
| 122 | 122 | $output->writeln('<comment>File Permissions Set</comment>'); |
| 123 | 123 | |
| 124 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento\''; |
|
| 124 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento\''; |
|
| 125 | 125 | new ProcessCommand($command, $projectPath, $output); |
| 126 | 126 | $output->writeln('<comment>bin/magento Permissions Set</comment>'); |
| 127 | 127 | } |
@@ -133,10 +133,10 @@ discard block |
||
| 133 | 133 | protected function configureRedis($projectPath, OutputInterface $output) |
| 134 | 134 | { |
| 135 | 135 | $output->writeln('<comment>Configuring Redis Cache</comment>'); |
| 136 | - $file = "$projectPath/public/app/etc/env.php"; |
|
| 137 | - $env = include $file; |
|
| 136 | + $file="$projectPath/public/app/etc/env.php"; |
|
| 137 | + $env=include $file; |
|
| 138 | 138 | |
| 139 | - $env['cache'] = [ |
|
| 139 | + $env['cache']=[ |
|
| 140 | 140 | 'frontend' => [ |
| 141 | 141 | 'default' => [ |
| 142 | 142 | 'backend' => 'Cm_Cache_Backend_Redis', |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | ], |
| 176 | 176 | ]; |
| 177 | 177 | |
| 178 | - file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
|
| 178 | + file_put_contents($file, "<?php \n \n return ".var_export($env, true).";"); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -185,11 +185,11 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) |
| 187 | 187 | { |
| 188 | - $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \''; |
|
| 188 | + $command='vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \''; |
|
| 189 | 189 | $output->writeln('<comment>Reindexing Tables</comment>'); |
| 190 | 190 | new ProcessCommand($command, $projectPath, $output); |
| 191 | 191 | |
| 192 | - $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\''; |
|
| 192 | + $command='vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\''; |
|
| 193 | 193 | $output->writeln('<comment>Flushing All Cache</comment>'); |
| 194 | 194 | new ProcessCommand($command, $projectPath, $output); |
| 195 | 195 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | protected function showCredentials(array $options, OutputInterface $output) |
| 205 | 205 | { |
| 206 | 206 | $output->writeln('<info>SUCCESS: Magestead has finished installing Magento 2!</info>'); |
| 207 | - $table = new Table($output); |
|
| 207 | + $table=new Table($output); |
|
| 208 | 208 | $table |
| 209 | 209 | ->setHeaders(['Username', 'Password', 'Base URL', 'Admin URI']) |
| 210 | 210 | ->setRows([ |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | protected function processVcs(array $options, $projectPath, OutputInterface $output) |
| 225 | 225 | { |
| 226 | 226 | if (!empty($options['repo_url'])) { |
| 227 | - copy($projectPath . "/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath . "/.gitignore"); |
|
| 227 | + copy($projectPath."/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath."/.gitignore"); |
|
| 228 | 228 | return new VersionControl($options['repo_url'], $projectPath, $output); |
| 229 | 229 | } |
| 230 | 230 | } |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | protected function setComposerBinDir($projectPath) |
| 236 | 236 | { |
| 237 | - $file = "$projectPath/public/composer.json"; |
|
| 238 | - $composer = json_decode(file_get_contents($file), true); |
|
| 239 | - $composer['config']['bin-dir'] = 'bin'; |
|
| 237 | + $file="$projectPath/public/composer.json"; |
|
| 238 | + $composer=json_decode(file_get_contents($file), true); |
|
| 239 | + $composer['config']['bin-dir']='bin'; |
|
| 240 | 240 | file_put_contents($file, json_encode($composer)); |
| 241 | 241 | } |
| 242 | 242 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | protected function setPhpSpecPermissions($projectPath, OutputInterface $output) |
| 248 | 248 | { |
| 249 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\''; |
|
| 249 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\''; |
|
| 250 | 250 | new ProcessCommand($command, $projectPath, $output); |
| 251 | 251 | } |
| 252 | 252 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | protected function setBehatPermissions($projectPath, OutputInterface $output) |
| 258 | 258 | { |
| 259 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\''; |
|
| 259 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\''; |
|
| 260 | 260 | new ProcessCommand($command, $projectPath, $output); |
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | \ No newline at end of file |
@@ -12,11 +12,11 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | class Options |
| 14 | 14 | { |
| 15 | - const BOX_PREFIX = 'richdynamix/magestead-'; |
|
| 15 | + const BOX_PREFIX='richdynamix/magestead-'; |
|
| 16 | 16 | |
| 17 | - protected $_app = 'magento2'; |
|
| 18 | - protected $_phpVer = '56'; |
|
| 19 | - protected $_os = 'centos65'; |
|
| 17 | + protected $_app='magento2'; |
|
| 18 | + protected $_phpVer='56'; |
|
| 19 | + protected $_os='centos65'; |
|
| 20 | 20 | protected $_server; |
| 21 | 21 | protected $_box; |
| 22 | 22 | protected $_m2Username; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | protected $_locale; |
| 28 | 28 | protected $_currency; |
| 29 | 29 | protected $_baseUrl; |
| 30 | - protected $_repoUrl = ''; |
|
| 30 | + protected $_repoUrl=''; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Options constructor. |
@@ -80,14 +80,14 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | $output->writeln('<comment>Lets configure your project\'s VM</comment>'); |
| 82 | 82 | |
| 83 | - $ipQuestion = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47'); |
|
| 84 | - $this->_ipAddress = strtolower($helper->ask($input, $output, $ipQuestion)); |
|
| 83 | + $ipQuestion=new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47'); |
|
| 84 | + $this->_ipAddress=strtolower($helper->ask($input, $output, $ipQuestion)); |
|
| 85 | 85 | |
| 86 | - $cpuQuestion = new Question("How many CPU's would you like to use? (1): ", '1'); |
|
| 87 | - $this->_cpus = strtolower($helper->ask($input, $output, $cpuQuestion)); |
|
| 86 | + $cpuQuestion=new Question("How many CPU's would you like to use? (1): ", '1'); |
|
| 87 | + $this->_cpus=strtolower($helper->ask($input, $output, $cpuQuestion)); |
|
| 88 | 88 | |
| 89 | - $memoryQuestion = new Question("Define the VM memory limit (2048): ", '2048'); |
|
| 90 | - $this->_memorylimit = strtolower($helper->ask($input, $output, $memoryQuestion)); |
|
| 89 | + $memoryQuestion=new Question("Define the VM memory limit (2048): ", '2048'); |
|
| 90 | + $this->_memorylimit=strtolower($helper->ask($input, $output, $memoryQuestion)); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -99,23 +99,23 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $output->writeln('<comment>Lets configure your project\'s application</comment>'); |
| 101 | 101 | if ($this->_phpVer !== '70') { |
| 102 | - $appQuestion = new ChoiceQuestion( |
|
| 102 | + $appQuestion=new ChoiceQuestion( |
|
| 103 | 103 | "Which application do you want to install?", |
| 104 | 104 | ['Magento', 'Magento 2'], |
| 105 | 105 | 0 |
| 106 | 106 | ); |
| 107 | 107 | |
| 108 | - $this->_app = strtolower($helper->ask($input, $output, $appQuestion)); |
|
| 108 | + $this->_app=strtolower($helper->ask($input, $output, $appQuestion)); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - $baseUrlQuestion = new Question("Enter your application's base_url (magestead.dev): ", 'magestead.dev'); |
|
| 112 | - $this->_baseUrl = strtolower($helper->ask($input, $output, $baseUrlQuestion)); |
|
| 111 | + $baseUrlQuestion=new Question("Enter your application's base_url (magestead.dev): ", 'magestead.dev'); |
|
| 112 | + $this->_baseUrl=strtolower($helper->ask($input, $output, $baseUrlQuestion)); |
|
| 113 | 113 | |
| 114 | - $currenyQuestion = new Question("Enter your application's default currency (GBP): ", 'GBP'); |
|
| 115 | - $this->_currency = $helper->ask($input, $output, $currenyQuestion); |
|
| 114 | + $currenyQuestion=new Question("Enter your application's default currency (GBP): ", 'GBP'); |
|
| 115 | + $this->_currency=$helper->ask($input, $output, $currenyQuestion); |
|
| 116 | 116 | |
| 117 | - $localeQuestion = new Question("Enter your application's default locale (en_GB): ", 'en_GB'); |
|
| 118 | - $this->_locale = $helper->ask($input, $output, $localeQuestion); |
|
| 117 | + $localeQuestion=new Question("Enter your application's default locale (en_GB): ", 'en_GB'); |
|
| 118 | + $this->_locale=$helper->ask($input, $output, $localeQuestion); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -140,11 +140,11 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) |
| 142 | 142 | { |
| 143 | - $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
|
| 144 | - $versioning = $helper->ask($input, $output, $versionControl); |
|
| 143 | + $versionControl=new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
|
| 144 | + $versioning=$helper->ask($input, $output, $versionControl); |
|
| 145 | 145 | if ($versioning) { |
| 146 | - $repoQuestion = new Question("Enter your full GitHub/BitBucket repo URL: ", ''); |
|
| 147 | - $this->_repoUrl = strtolower($helper->ask($input, $output, $repoQuestion)); |
|
| 146 | + $repoQuestion=new Question("Enter your full GitHub/BitBucket repo URL: ", ''); |
|
| 147 | + $this->_repoUrl=strtolower($helper->ask($input, $output, $repoQuestion)); |
|
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
@@ -155,11 +155,11 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | protected function askForAuth($helper, InputInterface $input, OutputInterface $output) |
| 157 | 157 | { |
| 158 | - $username = new Question("Please enter your Magento username (public key): ", ''); |
|
| 159 | - $this->_m2Username = $helper->ask($input, $output, $username); |
|
| 158 | + $username=new Question("Please enter your Magento username (public key): ", ''); |
|
| 159 | + $this->_m2Username=$helper->ask($input, $output, $username); |
|
| 160 | 160 | |
| 161 | - $password = new Question("Please enter your Magento password (private key): ", ''); |
|
| 162 | - $this->_m2Password = $helper->ask($input, $output, $password); |
|
| 161 | + $password=new Question("Please enter your Magento password (private key): ", ''); |
|
| 162 | + $this->_m2Password=$helper->ask($input, $output, $password); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -170,12 +170,12 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) |
| 172 | 172 | { |
| 173 | - $authFile = $_SERVER['HOME'] . "/.composer/auth.json"; |
|
| 173 | + $authFile=$_SERVER['HOME']."/.composer/auth.json"; |
|
| 174 | 174 | |
| 175 | - $authObj = []; |
|
| 175 | + $authObj=[]; |
|
| 176 | 176 | if (file_exists($authFile)) { |
| 177 | - $authJson = file_get_contents($authFile); |
|
| 178 | - $authObj = (array)json_decode($authJson); |
|
| 177 | + $authJson=file_get_contents($authFile); |
|
| 178 | + $authObj=(array) json_decode($authJson); |
|
| 179 | 179 | |
| 180 | 180 | if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) { |
| 181 | 181 | return true; |
@@ -184,10 +184,10 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | $this->askForAuth($helper, $input, $output); |
| 186 | 186 | |
| 187 | - $authObj['http-basic']['repo.magento.com']['username'] = $this->_m2Username; |
|
| 188 | - $authObj['http-basic']['repo.magento.com']['password'] = $this->_m2Password; |
|
| 187 | + $authObj['http-basic']['repo.magento.com']['username']=$this->_m2Username; |
|
| 188 | + $authObj['http-basic']['repo.magento.com']['password']=$this->_m2Password; |
|
| 189 | 189 | |
| 190 | - $authJson = json_encode($authObj); |
|
| 190 | + $authJson=json_encode($authObj); |
|
| 191 | 191 | return file_put_contents($authFile, $authJson); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -199,13 +199,13 @@ discard block |
||
| 199 | 199 | protected function setPhp($helper, InputInterface $input, OutputInterface $output) |
| 200 | 200 | { |
| 201 | 201 | $output->writeln('<info>Keep in mind PHP7 is only available for Magento 2</info>'); |
| 202 | - $phpVerQuestion = new ChoiceQuestion( |
|
| 202 | + $phpVerQuestion=new ChoiceQuestion( |
|
| 203 | 203 | "Which version of PHP should be installed?", |
| 204 | 204 | ['56', '70'], |
| 205 | 205 | 0 |
| 206 | 206 | ); |
| 207 | 207 | |
| 208 | - $this->_phpVer = $helper->ask($input, $output, $phpVerQuestion); |
|
| 208 | + $this->_phpVer=$helper->ask($input, $output, $phpVerQuestion); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | protected function setVagrantBox() |
| 215 | 215 | { |
| 216 | - $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer"; |
|
| 216 | + $this->_box=self::BOX_PREFIX.$this->_os."-$this->_server-php$this->_phpVer"; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -236,12 +236,12 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | protected function setWebServer($helper, InputInterface $input, OutputInterface $output) |
| 238 | 238 | { |
| 239 | - $serverQuestion = new ChoiceQuestion( |
|
| 239 | + $serverQuestion=new ChoiceQuestion( |
|
| 240 | 240 | "Which webserver would you like?", |
| 241 | 241 | ['NGINX', 'Apache'], |
| 242 | 242 | 0 |
| 243 | 243 | ); |
| 244 | - $this->_server = strtolower($helper->ask($input, $output, $serverQuestion)); |
|
| 244 | + $this->_server=strtolower($helper->ask($input, $output, $serverQuestion)); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | /** |
@@ -251,11 +251,11 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) |
| 253 | 253 | { |
| 254 | - $osQuestion = new ChoiceQuestion( |
|
| 254 | + $osQuestion=new ChoiceQuestion( |
|
| 255 | 255 | "Which OS would you like to install?", |
| 256 | 256 | ['CentOS 6.5', 'Ubuntu 14'], |
| 257 | 257 | 0 |
| 258 | 258 | ); |
| 259 | - $this->_os = str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion)))); |
|
| 259 | + $this->_os=str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion)))); |
|
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | \ No newline at end of file |