@@ -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; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\''; |
|
124 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\''; |
|
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,10 +234,10 @@ 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); |
|
237 | + $file="$projectPath/public/composer.json"; |
|
238 | + $composer=json_decode(file_get_contents($file), true); |
|
239 | 239 | |
240 | - $composer['config']['bin-dir'] = 'bin'; |
|
240 | + $composer['config']['bin-dir']='bin'; |
|
241 | 241 | file_put_contents($file, json_encode($composer)); |
242 | 242 | } |
243 | 243 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | protected function setPhpSpecPermissions($projectPath, OutputInterface $output) |
249 | 249 | { |
250 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\''; |
|
250 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\''; |
|
251 | 251 | new ProcessCommand($command, $projectPath, $output); |
252 | 252 | } |
253 | 253 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | protected function setBehatPermissions($projectPath, OutputInterface $output) |
259 | 259 | { |
260 | - $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\''; |
|
260 | + $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\''; |
|
261 | 261 | new ProcessCommand($command, $projectPath, $output); |
262 | 262 | } |
263 | 263 | } |
264 | 264 | \ No newline at end of file |