@@ -29,8 +29,8 @@ |
||
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 |
@@ -12,8 +12,7 @@ discard block |
||
12 | 12 | * @param array $options |
13 | 13 | * @param OutputInterface $output |
14 | 14 | */ |
15 | - public static function verify(array $options, OutputInterface $output) |
|
16 | - { |
|
15 | + public static function verify(array $options, OutputInterface $output) { |
|
17 | 16 | $hostPlugin = `vagrant plugin list | grep vagrant-hostsupdater`; |
18 | 17 | if (is_null($hostPlugin)) { |
19 | 18 | self::editHostsInstructions($options, $output); |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @param array $options |
27 | 26 | * @param OutputInterface $output |
28 | 27 | */ |
29 | - protected static function editHostsInstructions(array $options, OutputInterface $output) |
|
30 | - { |
|
28 | + protected static function editHostsInstructions(array $options, OutputInterface $output) { |
|
31 | 29 | $output->writeln('<comment>NOTE: You will need to add the following to your hosts file!</comment>'); |
32 | 30 | $comment = $options['vagrantfile']['vm']['network']['private_network'] . |
33 | 31 | ' ' . $options['magestead']['apps']['mba_12345']['base_url']; |
@@ -50,10 +50,10 @@ |
||
50 | 50 | */ |
51 | 51 | protected function readConfigFile() |
52 | 52 | { |
53 | - if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
|
53 | + if (!file_exists($this->_projectPath.'/magestead.yaml')) { |
|
54 | 54 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
55 | 55 | } |
56 | 56 | |
57 | - return file_get_contents($this->_projectPath . '/magestead.yaml'); |
|
57 | + return file_get_contents($this->_projectPath.'/magestead.yaml'); |
|
58 | 58 | } |
59 | 59 | } |
@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | * Config constructor. |
14 | 14 | * @param OutputInterface $output |
15 | 15 | */ |
16 | - public function __construct(OutputInterface $output) |
|
17 | - { |
|
16 | + public function __construct(OutputInterface $output) { |
|
18 | 17 | $this->_projectPath = getcwd(); |
19 | 18 | $this->_config = $this->getConfigFile($output); |
20 | 19 | } |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * @param $name |
24 | 23 | * @return mixed |
25 | 24 | */ |
26 | - function __get($name) |
|
27 | - { |
|
25 | + function __get($name) { |
|
28 | 26 | return $this->_config['magestead']['apps']['mba_12345'][$name]; |
29 | 27 | } |
30 | 28 | |
@@ -32,8 +30,7 @@ discard block |
||
32 | 30 | * @param OutputInterface $output |
33 | 31 | * @return bool|mixed |
34 | 32 | */ |
35 | - protected function getConfigFile(OutputInterface $output) |
|
36 | - { |
|
33 | + protected function getConfigFile(OutputInterface $output) { |
|
37 | 34 | $config = new Parser(); |
38 | 35 | try { |
39 | 36 | return $config->parse($this->readConfigFile()); |
@@ -48,8 +45,7 @@ discard block |
||
48 | 45 | * @return string |
49 | 46 | * @throws MissingConfigFileException |
50 | 47 | */ |
51 | - protected function readConfigFile() |
|
52 | - { |
|
48 | + protected function readConfigFile() { |
|
53 | 49 | if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
54 | 50 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
55 | 51 | } |
@@ -58,6 +58,6 @@ |
||
58 | 58 | break; |
59 | 59 | } |
60 | 60 | |
61 | - return false; |
|
61 | + return FALSE; |
|
62 | 62 | } |
63 | 63 | } |
@@ -53,20 +53,20 @@ |
||
53 | 53 | public function getAllOptions() |
54 | 54 | { |
55 | 55 | return [ |
56 | - 'app' => $this->_app, |
|
57 | - 'server' => $this->_server, |
|
58 | - 'phpver' => $this->_phpVer, |
|
59 | - 'os' => $this->_os, |
|
60 | - 'box' => $this->_box, |
|
61 | - 'm2user' => $this->_m2Username, |
|
62 | - 'm2pass' => $this->_m2Password, |
|
63 | - 'repo_url' => $this->_repoUrl, |
|
64 | - 'ip_address' => $this->_ipAddress, |
|
65 | - 'cpus' => $this->_cpus, |
|
66 | - 'memory_limit' => $this->_memorylimit, |
|
67 | - 'locale' => $this->_locale, |
|
68 | - 'default_currency' => $this->_currency, |
|
69 | - 'base_url' => $this->_baseUrl, |
|
56 | + 'app' => $this->_app, |
|
57 | + 'server' => $this->_server, |
|
58 | + 'phpver' => $this->_phpVer, |
|
59 | + 'os' => $this->_os, |
|
60 | + 'box' => $this->_box, |
|
61 | + 'm2user' => $this->_m2Username, |
|
62 | + 'm2pass' => $this->_m2Password, |
|
63 | + 'repo_url' => $this->_repoUrl, |
|
64 | + 'ip_address' => $this->_ipAddress, |
|
65 | + 'cpus' => $this->_cpus, |
|
66 | + 'memory_limit' => $this->_memorylimit, |
|
67 | + 'locale' => $this->_locale, |
|
68 | + 'default_currency' => $this->_currency, |
|
69 | + 'base_url' => $this->_baseUrl, |
|
70 | 70 | ]; |
71 | 71 | } |
72 | 72 |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | */ |
169 | 169 | protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) |
170 | 170 | { |
171 | - $authFile = $_SERVER['HOME'] . "/.composer/auth.json"; |
|
171 | + $authFile = $_SERVER['HOME']."/.composer/auth.json"; |
|
172 | 172 | |
173 | 173 | $authObj = []; |
174 | 174 | if (file_exists($authFile)) { |
175 | 175 | $authJson = file_get_contents($authFile); |
176 | - $authObj = (array)json_decode($authJson); |
|
176 | + $authObj = (array) json_decode($authJson); |
|
177 | 177 | |
178 | 178 | if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) { |
179 | 179 | return true; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | protected function setVagrantBox() |
213 | 213 | { |
214 | - $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer"; |
|
214 | + $this->_box = self::BOX_PREFIX.$this->_os."-$this->_server-php$this->_phpVer"; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
@@ -34,8 +34,7 @@ discard block |
||
34 | 34 | * @param InputInterface $input |
35 | 35 | * @param OutputInterface $output |
36 | 36 | */ |
37 | - public function __construct($helper, InputInterface $input, OutputInterface $output) |
|
38 | - { |
|
37 | + public function __construct($helper, InputInterface $input, OutputInterface $output) { |
|
39 | 38 | $this->setVagrantSettings($helper, $input, $output); |
40 | 39 | |
41 | 40 | $this->setServerConfig($helper, $input, $output); |
@@ -50,8 +49,7 @@ discard block |
||
50 | 49 | /** |
51 | 50 | * @return array |
52 | 51 | */ |
53 | - public function getAllOptions() |
|
54 | - { |
|
52 | + public function getAllOptions() { |
|
55 | 53 | return [ |
56 | 54 | 'app' => $this->_app, |
57 | 55 | 'server' => $this->_server, |
@@ -75,8 +73,7 @@ discard block |
||
75 | 73 | * @param InputInterface $input |
76 | 74 | * @param OutputInterface $output |
77 | 75 | */ |
78 | - protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) |
|
79 | - { |
|
76 | + protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) { |
|
80 | 77 | $output->writeln('<comment>Lets configure your project\'s VM</comment>'); |
81 | 78 | |
82 | 79 | $ipQuestion = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47'); |
@@ -94,8 +91,7 @@ discard block |
||
94 | 91 | * @param InputInterface $input |
95 | 92 | * @param OutputInterface $output |
96 | 93 | */ |
97 | - protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output) |
|
98 | - { |
|
94 | + protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output) { |
|
99 | 95 | $output->writeln('<comment>Lets configure your project\'s application</comment>'); |
100 | 96 | if ($this->_phpVer !== '70') { |
101 | 97 | $appQuestion = new ChoiceQuestion( |
@@ -122,8 +118,7 @@ discard block |
||
122 | 118 | * @param OutputInterface $output |
123 | 119 | * @return bool |
124 | 120 | */ |
125 | - protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) |
|
126 | - { |
|
121 | + protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) { |
|
127 | 122 | if ($this->_app === 'magento2') { |
128 | 123 | return $this->verifyAuth($helper, $input, $output); |
129 | 124 | } |
@@ -136,8 +131,7 @@ discard block |
||
136 | 131 | * @param InputInterface $input |
137 | 132 | * @param OutputInterface $output |
138 | 133 | */ |
139 | - protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) |
|
140 | - { |
|
134 | + protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) { |
|
141 | 135 | $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
142 | 136 | $versioning = $helper->ask($input, $output, $versionControl); |
143 | 137 | if ($versioning) { |
@@ -151,8 +145,7 @@ discard block |
||
151 | 145 | * @param InputInterface $input |
152 | 146 | * @param OutputInterface $output |
153 | 147 | */ |
154 | - protected function askForAuth($helper, InputInterface $input, OutputInterface $output) |
|
155 | - { |
|
148 | + protected function askForAuth($helper, InputInterface $input, OutputInterface $output) { |
|
156 | 149 | $username = new Question("Please enter your Magento username (public key): ", ''); |
157 | 150 | $this->_m2Username = $helper->ask($input, $output, $username); |
158 | 151 | |
@@ -166,8 +159,7 @@ discard block |
||
166 | 159 | * @param OutputInterface $output |
167 | 160 | * @return bool |
168 | 161 | */ |
169 | - protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) |
|
170 | - { |
|
162 | + protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) { |
|
171 | 163 | $authFile = $_SERVER['HOME'] . "/.composer/auth.json"; |
172 | 164 | |
173 | 165 | $authObj = []; |
@@ -194,8 +186,7 @@ discard block |
||
194 | 186 | * @param InputInterface $input |
195 | 187 | * @param OutputInterface $output |
196 | 188 | */ |
197 | - protected function setPhp($helper, InputInterface $input, OutputInterface $output) |
|
198 | - { |
|
189 | + protected function setPhp($helper, InputInterface $input, OutputInterface $output) { |
|
199 | 190 | $output->writeln('<info>Keep in mind PHP7 is only available for Magento 2</info>'); |
200 | 191 | $phpVerQuestion = new ChoiceQuestion( |
201 | 192 | "Which version of PHP should be installed?", |
@@ -209,8 +200,7 @@ discard block |
||
209 | 200 | /** |
210 | 201 | * Set box name from concat user options |
211 | 202 | */ |
212 | - protected function setVagrantBox() |
|
213 | - { |
|
203 | + protected function setVagrantBox() { |
|
214 | 204 | $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer"; |
215 | 205 | } |
216 | 206 | |
@@ -219,8 +209,7 @@ discard block |
||
219 | 209 | * @param InputInterface $input |
220 | 210 | * @param OutputInterface $output |
221 | 211 | */ |
222 | - protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) |
|
223 | - { |
|
212 | + protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) { |
|
224 | 213 | $output->writeln('<comment>Lets configure your server</comment>'); |
225 | 214 | $this->setOperatingSystem($helper, $input, $output); |
226 | 215 | $this->setWebServer($helper, $input, $output); |
@@ -232,8 +221,7 @@ discard block |
||
232 | 221 | * @param InputInterface $input |
233 | 222 | * @param OutputInterface $output |
234 | 223 | */ |
235 | - protected function setWebServer($helper, InputInterface $input, OutputInterface $output) |
|
236 | - { |
|
224 | + protected function setWebServer($helper, InputInterface $input, OutputInterface $output) { |
|
237 | 225 | $serverQuestion = new ChoiceQuestion( |
238 | 226 | "Which webserver would you like?", |
239 | 227 | ['NGINX', 'Apache'], |
@@ -247,8 +235,7 @@ discard block |
||
247 | 235 | * @param InputInterface $input |
248 | 236 | * @param OutputInterface $output |
249 | 237 | */ |
250 | - protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) |
|
251 | - { |
|
238 | + protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) { |
|
252 | 239 | $osQuestion = new ChoiceQuestion( |
253 | 240 | "Which OS would you like to install?", |
254 | 241 | ['CentOS 6.5', 'Ubuntu 14'], |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return $this->verifyAuth($helper, $input, $output); |
129 | 129 | } |
130 | 130 | |
131 | - return true; |
|
131 | + return TRUE; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) |
140 | 140 | { |
141 | - $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
|
141 | + $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", FALSE); |
|
142 | 142 | $versioning = $helper->ask($input, $output, $versionControl); |
143 | 143 | if ($versioning) { |
144 | 144 | $repoQuestion = new Question("Enter your full GitHub/BitBucket repo URL: ", ''); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $authObj = (array)json_decode($authJson); |
177 | 177 | |
178 | 178 | if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) { |
179 | - return true; |
|
179 | + return TRUE; |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 |
@@ -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 | /** |
@@ -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 | } |
@@ -20,8 +20,7 @@ discard block |
||
20 | 20 | * @param $projectPath |
21 | 21 | * @param OutputInterface $output |
22 | 22 | */ |
23 | - public function __construct(array $options, array $config, $projectPath, OutputInterface $output) |
|
24 | - { |
|
23 | + public function __construct(array $options, array $config, $projectPath, OutputInterface $output) { |
|
25 | 24 | $this->composerInstall($projectPath, $output); |
26 | 25 | $this->installMagento($config, $projectPath, $output); |
27 | 26 | $this->finaliseSetup($options, $projectPath, $output); |
@@ -34,8 +33,7 @@ discard block |
||
34 | 33 | * @param $projectPath |
35 | 34 | * @param OutputInterface $output |
36 | 35 | */ |
37 | - protected function composerInstall($projectPath, OutputInterface $output) |
|
38 | - { |
|
36 | + protected function composerInstall($projectPath, OutputInterface $output) { |
|
39 | 37 | $output->writeln('<info>Installing Magento 2 with Composer</info>'); |
40 | 38 | $command = 'composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public'; |
41 | 39 | new ProcessCommand($command, $projectPath, $output); |
@@ -49,8 +47,7 @@ discard block |
||
49 | 47 | * @param $projectPath |
50 | 48 | * @param OutputInterface $output |
51 | 49 | */ |
52 | - protected function addPhpSpecPackage($projectPath, OutputInterface $output) |
|
53 | - { |
|
50 | + protected function addPhpSpecPackage($projectPath, OutputInterface $output) { |
|
54 | 51 | $output->writeln('<comment>Installing PHPSpec</comment>'); |
55 | 52 | $command = 'cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;'; |
56 | 53 | new ProcessCommand($command, $projectPath, $output); |
@@ -62,8 +59,7 @@ discard block |
||
62 | 59 | * @param $projectPath |
63 | 60 | * @param OutputInterface $output |
64 | 61 | */ |
65 | - protected function addBehatPackage($projectPath, OutputInterface $output) |
|
66 | - { |
|
62 | + protected function addBehatPackage($projectPath, OutputInterface $output) { |
|
67 | 63 | $output->writeln('<comment>Installing Behat</comment>'); |
68 | 64 | $command = 'cd '.$projectPath.'/public; composer require behat/behat --dev;'; |
69 | 65 | new ProcessCommand($command, $projectPath, $output); |
@@ -76,8 +72,7 @@ discard block |
||
76 | 72 | * @param $projectPath |
77 | 73 | * @param OutputInterface $output |
78 | 74 | */ |
79 | - protected function installMagento(array $options, $projectPath, OutputInterface $output) |
|
80 | - { |
|
75 | + protected function installMagento(array $options, $projectPath, OutputInterface $output) { |
|
81 | 76 | $this->setPermissions($projectPath, $output); |
82 | 77 | |
83 | 78 | $output->writeln('<info>Installing Magento 2 Software</info>'); |
@@ -110,8 +105,7 @@ discard block |
||
110 | 105 | * @param $projectPath |
111 | 106 | * @param OutputInterface $output |
112 | 107 | */ |
113 | - protected function setPermissions($projectPath, OutputInterface $output) |
|
114 | - { |
|
108 | + protected function setPermissions($projectPath, OutputInterface $output) { |
|
115 | 109 | $output->writeln('<info>Setting Permissions</info>'); |
116 | 110 | $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\''; |
117 | 111 | new ProcessCommand($command, $projectPath, $output); |
@@ -130,8 +124,7 @@ discard block |
||
130 | 124 | * @param $projectPath |
131 | 125 | * @param OutputInterface $output |
132 | 126 | */ |
133 | - protected function configureRedis($projectPath, OutputInterface $output) |
|
134 | - { |
|
127 | + protected function configureRedis($projectPath, OutputInterface $output) { |
|
135 | 128 | $output->writeln('<comment>Configuring Redis Cache</comment>'); |
136 | 129 | $file = "$projectPath/public/app/etc/env.php"; |
137 | 130 | $env = include $file; |
@@ -183,8 +176,7 @@ discard block |
||
183 | 176 | * @param $projectPath |
184 | 177 | * @param OutputInterface $output |
185 | 178 | */ |
186 | - protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) |
|
187 | - { |
|
179 | + protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) { |
|
188 | 180 | $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \''; |
189 | 181 | $output->writeln('<comment>Reindexing Tables</comment>'); |
190 | 182 | new ProcessCommand($command, $projectPath, $output); |
@@ -201,8 +193,7 @@ discard block |
||
201 | 193 | * @param array $options |
202 | 194 | * @param OutputInterface $output |
203 | 195 | */ |
204 | - protected function showCredentials(array $options, OutputInterface $output) |
|
205 | - { |
|
196 | + protected function showCredentials(array $options, OutputInterface $output) { |
|
206 | 197 | $output->writeln('<info>SUCCESS: Magestead has finished installing Magento 2!</info>'); |
207 | 198 | $table = new Table($output); |
208 | 199 | $table |
@@ -221,8 +212,7 @@ discard block |
||
221 | 212 | * @param OutputInterface $output |
222 | 213 | * @return VersionControl |
223 | 214 | */ |
224 | - protected function processVcs(array $options, $projectPath, OutputInterface $output) |
|
225 | - { |
|
215 | + protected function processVcs(array $options, $projectPath, OutputInterface $output) { |
|
226 | 216 | if (!empty($options['repo_url'])) { |
227 | 217 | copy($projectPath . "/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath . "/.gitignore"); |
228 | 218 | return new VersionControl($options['repo_url'], $projectPath, $output); |
@@ -232,8 +222,7 @@ discard block |
||
232 | 222 | /** |
233 | 223 | * @param $projectPath |
234 | 224 | */ |
235 | - protected function setComposerBinDir($projectPath) |
|
236 | - { |
|
225 | + protected function setComposerBinDir($projectPath) { |
|
237 | 226 | $file = "$projectPath/public/composer.json"; |
238 | 227 | $composer = json_decode(file_get_contents($file), true); |
239 | 228 | $composer['config']['bin-dir'] = 'bin'; |
@@ -244,8 +233,7 @@ discard block |
||
244 | 233 | * @param $projectPath |
245 | 234 | * @param OutputInterface $output |
246 | 235 | */ |
247 | - protected function setPhpSpecPermissions($projectPath, OutputInterface $output) |
|
248 | - { |
|
236 | + protected function setPhpSpecPermissions($projectPath, OutputInterface $output) { |
|
249 | 237 | $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\''; |
250 | 238 | new ProcessCommand($command, $projectPath, $output); |
251 | 239 | } |
@@ -254,8 +242,7 @@ discard block |
||
254 | 242 | * @param $projectPath |
255 | 243 | * @param OutputInterface $output |
256 | 244 | */ |
257 | - protected function setBehatPermissions($projectPath, OutputInterface $output) |
|
258 | - { |
|
245 | + protected function setBehatPermissions($projectPath, OutputInterface $output) { |
|
259 | 246 | $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\''; |
260 | 247 | new ProcessCommand($command, $projectPath, $output); |
261 | 248 | } |
@@ -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 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | protected function setComposerBinDir($projectPath) |
236 | 236 | { |
237 | 237 | $file = "$projectPath/public/composer.json"; |
238 | - $composer = json_decode(file_get_contents($file), true); |
|
238 | + $composer = json_decode(file_get_contents($file), TRUE); |
|
239 | 239 | $composer['config']['bin-dir'] = 'bin'; |
240 | 240 | file_put_contents($file, json_encode($composer)); |
241 | 241 | } |
@@ -55,20 +55,20 @@ discard block |
||
55 | 55 | |
56 | 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]" \ |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | protected function processVcs(array $options, $projectPath, OutputInterface $output) |
190 | 190 | { |
191 | 191 | if (!empty($options['repo_url'])) { |
192 | - copy($projectPath . "/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath . "/.gitignore"); |
|
192 | + copy($projectPath."/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath."/.gitignore"); |
|
193 | 193 | return new VersionControl($options['repo_url'], $projectPath, $output); |
194 | 194 | } |
195 | 195 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | protected function composerInstall($projectPath, OutputInterface $output) |
202 | 202 | { |
203 | - copy($projectPath . "/puphpet/magestead/magento/stubs/composer.tmp", $projectPath . "/composer.json"); |
|
203 | + copy($projectPath."/puphpet/magestead/magento/stubs/composer.tmp", $projectPath."/composer.json"); |
|
204 | 204 | new ProcessCommand('composer install', $projectPath, $output); |
205 | 205 | } |
206 | 206 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | protected function updateConfigXml($projectPath) |
220 | 220 | { |
221 | 221 | $localFile = '/public/app/etc/local.xml'; |
222 | - $localXml = file_get_contents($projectPath . $localFile); |
|
222 | + $localXml = file_get_contents($projectPath.$localFile); |
|
223 | 223 | |
224 | 224 | $config = new \SimpleXMLElement($localXml); |
225 | 225 | $config->global[0]->redis_session[0]->host = '127.0.0.1'; |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $config->global[0]->redis_session[0]->min_lifetime = '60'; |
242 | 242 | $config->global[0]->redis_session[0]->max_lifetime = '2592000'; |
243 | 243 | |
244 | - file_put_contents($projectPath . $localFile, $config->asXML()); |
|
244 | + file_put_contents($projectPath.$localFile, $config->asXML()); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | /** |
@@ -250,10 +250,10 @@ discard block |
||
250 | 250 | protected function activateModule($projectPath) |
251 | 251 | { |
252 | 252 | $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml'; |
253 | - $moduleXml = file_get_contents($projectPath . $moduleFile); |
|
253 | + $moduleXml = file_get_contents($projectPath.$moduleFile); |
|
254 | 254 | $config = new \SimpleXMLElement($moduleXml); |
255 | 255 | $config->modules[0]->Cm_RedisSession[0]->active = 'true'; |
256 | - file_put_contents($projectPath . $moduleFile, $config->asXML()); |
|
256 | + file_put_contents($projectPath.$moduleFile, $config->asXML()); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $progress = new ProgressBar($output, 2); |
269 | 269 | |
270 | 270 | $progress->start(); |
271 | - copy($projectPath . "/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath . "/phpspec.yml"); |
|
271 | + copy($projectPath."/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath."/phpspec.yml"); |
|
272 | 272 | $progress->advance(); |
273 | 273 | $progress->advance(); |
274 | 274 | // $behat = $this->getBehatConfig($options, $projectPath, $output); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | { |
290 | 290 | $yaml = new Parser(); |
291 | 291 | try { |
292 | - $behat = $yaml->parse(file_get_contents($projectPath . "/puphpet/magestead/magento/stubs/behat.yml")); |
|
292 | + $behat = $yaml->parse(file_get_contents($projectPath."/puphpet/magestead/magento/stubs/behat.yml")); |
|
293 | 293 | $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url'] = $options['base_url']; |
294 | 294 | return $behat; |
295 | 295 | } catch (ParseException $e) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $dumper = new Dumper(); |
311 | 311 | $yaml = $dumper->dump($behat, 6); |
312 | 312 | try { |
313 | - file_put_contents($projectPath . '/behat.yml', $yaml); |
|
313 | + file_put_contents($projectPath.'/behat.yml', $yaml); |
|
314 | 314 | $progress->advance(); |
315 | 315 | } catch (\Exception $e) { |
316 | 316 | $output->writeln('<error>Unable to write to the YAML file</error>'); |
@@ -24,8 +24,7 @@ discard block |
||
24 | 24 | * @param $projectPath |
25 | 25 | * @param OutputInterface $output |
26 | 26 | */ |
27 | - public function __construct(array $options, array $config, $projectPath, OutputInterface $output) |
|
28 | - { |
|
27 | + public function __construct(array $options, array $config, $projectPath, OutputInterface $output) { |
|
29 | 28 | $output->writeln('<info>Installing Magento with Composer</info>'); |
30 | 29 | $this->composerInstall($projectPath, $output); |
31 | 30 | |
@@ -46,8 +45,7 @@ discard block |
||
46 | 45 | * @param $projectPath |
47 | 46 | * @param $output |
48 | 47 | */ |
49 | - protected function installMagento(array $options, $projectPath, OutputInterface $output) |
|
50 | - { |
|
48 | + protected function installMagento(array $options, $projectPath, OutputInterface $output) { |
|
51 | 49 | $locale = $options['magestead']['apps']['mba_12345']['locale']; |
52 | 50 | $db_name = $options['magestead']['apps']['mba_12345']['db_name']; |
53 | 51 | $base_url = $options['magestead']['apps']['mba_12345']['base_url']; |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | * @param $projectPath |
87 | 85 | * @param OutputInterface $output |
88 | 86 | */ |
89 | - protected function setPermissions($projectPath, OutputInterface $output) |
|
90 | - { |
|
87 | + protected function setPermissions($projectPath, OutputInterface $output) { |
|
91 | 88 | // $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 400 {} \;\''; |
92 | 89 | // $output->writeln('<comment>Setting Files Permissions</comment>'); |
93 | 90 | // new ProcessCommand($command, $projectPath, $output); |
@@ -125,8 +122,7 @@ discard block |
||
125 | 122 | * @param $projectPath |
126 | 123 | * @param OutputInterface $output |
127 | 124 | */ |
128 | - protected function installMagerun($projectPath, OutputInterface $output) |
|
129 | - { |
|
125 | + protected function installMagerun($projectPath, OutputInterface $output) { |
|
130 | 126 | $command = 'vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\''; |
131 | 127 | $output->writeln('<info>Downloading Magerun</info>'); |
132 | 128 | new ProcessCommand($command, $projectPath, $output); |
@@ -141,8 +137,7 @@ discard block |
||
141 | 137 | * @param $projectPath |
142 | 138 | * @param OutputInterface $output |
143 | 139 | */ |
144 | - protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) |
|
145 | - { |
|
140 | + protected function finaliseSetup(array $options, $projectPath, OutputInterface $output) { |
|
146 | 141 | $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\''; |
147 | 142 | $output->writeln('<comment>Reindexing Tables</comment>'); |
148 | 143 | new ProcessCommand($command, $projectPath, $output); |
@@ -166,8 +161,7 @@ discard block |
||
166 | 161 | * @param array $options |
167 | 162 | * @param OutputInterface $output |
168 | 163 | */ |
169 | - protected function showCredentials(array $options, OutputInterface $output) |
|
170 | - { |
|
164 | + protected function showCredentials(array $options, OutputInterface $output) { |
|
171 | 165 | $output->writeln('<info>SUCCESS: Magestead has finished installing Magento!</info>'); |
172 | 166 | $table = new Table($output); |
173 | 167 | $table |
@@ -186,8 +180,7 @@ discard block |
||
186 | 180 | * @param OutputInterface $output |
187 | 181 | * @return VersionControl |
188 | 182 | */ |
189 | - protected function processVcs(array $options, $projectPath, OutputInterface $output) |
|
190 | - { |
|
183 | + protected function processVcs(array $options, $projectPath, OutputInterface $output) { |
|
191 | 184 | if (!empty($options['repo_url'])) { |
192 | 185 | copy($projectPath . "/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath . "/.gitignore"); |
193 | 186 | return new VersionControl($options['repo_url'], $projectPath, $output); |
@@ -198,8 +191,7 @@ discard block |
||
198 | 191 | * @param $projectPath |
199 | 192 | * @param OutputInterface $output |
200 | 193 | */ |
201 | - protected function composerInstall($projectPath, OutputInterface $output) |
|
202 | - { |
|
194 | + protected function composerInstall($projectPath, OutputInterface $output) { |
|
203 | 195 | copy($projectPath . "/puphpet/magestead/magento/stubs/composer.tmp", $projectPath . "/composer.json"); |
204 | 196 | new ProcessCommand('composer install', $projectPath, $output); |
205 | 197 | } |
@@ -207,8 +199,7 @@ discard block |
||
207 | 199 | /** |
208 | 200 | * @param $projectPath |
209 | 201 | */ |
210 | - protected function configureRedis($projectPath) |
|
211 | - { |
|
202 | + protected function configureRedis($projectPath) { |
|
212 | 203 | $this->updateConfigXml($projectPath); |
213 | 204 | $this->activateModule($projectPath); |
214 | 205 | } |
@@ -216,8 +207,7 @@ discard block |
||
216 | 207 | /** |
217 | 208 | * @param $projectPath |
218 | 209 | */ |
219 | - protected function updateConfigXml($projectPath) |
|
220 | - { |
|
210 | + protected function updateConfigXml($projectPath) { |
|
221 | 211 | $localFile = '/public/app/etc/local.xml'; |
222 | 212 | $localXml = file_get_contents($projectPath . $localFile); |
223 | 213 | |
@@ -247,8 +237,7 @@ discard block |
||
247 | 237 | /** |
248 | 238 | * @param $projectPath |
249 | 239 | */ |
250 | - protected function activateModule($projectPath) |
|
251 | - { |
|
240 | + protected function activateModule($projectPath) { |
|
252 | 241 | $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml'; |
253 | 242 | $moduleXml = file_get_contents($projectPath . $moduleFile); |
254 | 243 | $config = new \SimpleXMLElement($moduleXml); |
@@ -262,8 +251,7 @@ discard block |
||
262 | 251 | * @param OutputInterface $output |
263 | 252 | * @return ProcessCommand |
264 | 253 | */ |
265 | - protected function configureTestSuites(array $options, $projectPath, OutputInterface $output) |
|
266 | - { |
|
254 | + protected function configureTestSuites(array $options, $projectPath, OutputInterface $output) { |
|
267 | 255 | $output->writeln('<info>Configuring PHPSpec & Behat Suites</info>'); |
268 | 256 | $progress = new ProgressBar($output, 2); |
269 | 257 | |
@@ -285,8 +273,7 @@ discard block |
||
285 | 273 | * @param OutputInterface $output |
286 | 274 | * @return bool|mixed |
287 | 275 | */ |
288 | - protected function getBehatConfig(array $options, $projectPath, OutputInterface $output) |
|
289 | - { |
|
276 | + protected function getBehatConfig(array $options, $projectPath, OutputInterface $output) { |
|
290 | 277 | $yaml = new Parser(); |
291 | 278 | try { |
292 | 279 | $behat = $yaml->parse(file_get_contents($projectPath . "/puphpet/magestead/magento/stubs/behat.yml")); |
@@ -305,8 +292,7 @@ discard block |
||
305 | 292 | * @param $behat |
306 | 293 | * @param $progress |
307 | 294 | */ |
308 | - protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress) |
|
309 | - { |
|
295 | + protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress) { |
|
310 | 296 | $dumper = new Dumper(); |
311 | 297 | $yaml = $dumper->dump($behat, 6); |
312 | 298 | try { |
@@ -58,6 +58,6 @@ |
||
58 | 58 | break; |
59 | 59 | } |
60 | 60 | |
61 | - return false; |
|
61 | + return FALSE; |
|
62 | 62 | } |
63 | 63 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | protected function configure() |
24 | 24 | { |
25 | - $this->_basePath = dirname( __FILE__ ) . '/../../../'; |
|
25 | + $this->_basePath = dirname(__FILE__).'/../../../'; |
|
26 | 26 | $this->_projectPath = getcwd(); |
27 | 27 | |
28 | 28 | $this->setName("setup"); |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | \RecursiveIteratorIterator::SELF_FIRST) as $item |
64 | 64 | ) { |
65 | 65 | if ($item->isDir()) { |
66 | - mkdir($target . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); |
|
66 | + mkdir($target.DIRECTORY_SEPARATOR.$iterator->getSubPathName()); |
|
67 | 67 | } else { |
68 | - copy($item, $target . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); |
|
68 | + copy($item, $target.DIRECTORY_SEPARATOR.$iterator->getSubPathName()); |
|
69 | 69 | } |
70 | 70 | $progress->advance(); |
71 | 71 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | { |
108 | 108 | $yaml = new Parser(); |
109 | 109 | try { |
110 | - return $yaml->parse(file_get_contents($this->_projectPath . '/magestead.yaml')); |
|
110 | + return $yaml->parse(file_get_contents($this->_projectPath.'/magestead.yaml')); |
|
111 | 111 | } catch (ParseException $e) { |
112 | 112 | $output->writeln('<error>Unable to parse the YAML string</error>'); |
113 | 113 | printf("Unable to parse the YAML string: %s", $e->getMessage()); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $yaml = $dumper->dump($config, 6); |
125 | 125 | |
126 | 126 | try { |
127 | - file_put_contents($this->_projectPath . '/magestead.yaml', $yaml); |
|
127 | + file_put_contents($this->_projectPath.'/magestead.yaml', $yaml); |
|
128 | 128 | } catch (\Exception $e) { |
129 | 129 | $output->writeln('<error>Unable to write to the YAML file</error>'); |
130 | 130 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | protected function setupProject(OutputInterface $output, $options) |
138 | 138 | { |
139 | 139 | $output->writeln('<info>Setting up project structure</info>'); |
140 | - $provisionFolder = $this->_basePath . "provision"; |
|
140 | + $provisionFolder = $this->_basePath."provision"; |
|
141 | 141 | $this->copyConfigFiles($provisionFolder, $this->_projectPath, $output); |
142 | 142 | $this->configureProject($options->getAllOptions(), $output); |
143 | 143 | } |
@@ -20,8 +20,7 @@ discard block |
||
20 | 20 | protected $_projectPath; |
21 | 21 | protected $_magesteadConfig; |
22 | 22 | |
23 | - protected function configure() |
|
24 | - { |
|
23 | + protected function configure() { |
|
25 | 24 | $this->_basePath = dirname( __FILE__ ) . '/../../../'; |
26 | 25 | $this->_projectPath = getcwd(); |
27 | 26 | |
@@ -34,8 +33,7 @@ discard block |
||
34 | 33 | * @param OutputInterface $output |
35 | 34 | * @return \Magestead\Installers\Magento2Project|\Magestead\Installers\MagentoProject |
36 | 35 | */ |
37 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
38 | - { |
|
36 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
39 | 37 | $helper = $this->getHelper('question'); |
40 | 38 | $options = new Options($helper, $input, $output); |
41 | 39 | |
@@ -52,8 +50,7 @@ discard block |
||
52 | 50 | * @param $target |
53 | 51 | * @param OutputInterface $output |
54 | 52 | */ |
55 | - protected function copyConfigFiles($source, $target, OutputInterface $output) |
|
56 | - { |
|
53 | + protected function copyConfigFiles($source, $target, OutputInterface $output) { |
|
57 | 54 | try { |
58 | 55 | $progress = new ProgressBar($output, 3720); |
59 | 56 | $progress->start(); |
@@ -80,8 +77,7 @@ discard block |
||
80 | 77 | * @param array $options |
81 | 78 | * @param OutputInterface $output |
82 | 79 | */ |
83 | - protected function configureProject(array $options, OutputInterface $output) |
|
84 | - { |
|
80 | + protected function configureProject(array $options, OutputInterface $output) { |
|
85 | 81 | $this->_magesteadConfig = $this->getConfigFile($output); |
86 | 82 | |
87 | 83 | $this->_magesteadConfig['vagrantfile']['vm']['box'] = $options['box']; |
@@ -103,8 +99,7 @@ discard block |
||
103 | 99 | * @param OutputInterface $output |
104 | 100 | * @return mixed |
105 | 101 | */ |
106 | - protected function getConfigFile(OutputInterface $output) |
|
107 | - { |
|
102 | + protected function getConfigFile(OutputInterface $output) { |
|
108 | 103 | $yaml = new Parser(); |
109 | 104 | try { |
110 | 105 | return $yaml->parse(file_get_contents($this->_projectPath . '/magestead.yaml')); |
@@ -118,8 +113,7 @@ discard block |
||
118 | 113 | * @param array $config |
119 | 114 | * @param OutputInterface $output |
120 | 115 | */ |
121 | - protected function saveConfigFile(array $config, OutputInterface $output) |
|
122 | - { |
|
116 | + protected function saveConfigFile(array $config, OutputInterface $output) { |
|
123 | 117 | $dumper = new Dumper(); |
124 | 118 | $yaml = $dumper->dump($config, 6); |
125 | 119 | |
@@ -134,8 +128,7 @@ discard block |
||
134 | 128 | * @param OutputInterface $output |
135 | 129 | * @param $options |
136 | 130 | */ |
137 | - protected function setupProject(OutputInterface $output, $options) |
|
138 | - { |
|
131 | + protected function setupProject(OutputInterface $output, $options) { |
|
139 | 132 | $output->writeln('<info>Setting up project structure</info>'); |
140 | 133 | $provisionFolder = $this->_basePath . "provision"; |
141 | 134 | $this->copyConfigFiles($provisionFolder, $this->_projectPath, $output); |
@@ -28,6 +28,6 @@ |
||
28 | 28 | protected function execute(InputInterface $input, OutputInterface $output) |
29 | 29 | { |
30 | 30 | passthru('vagrant ssh'); |
31 | - return true; |
|
31 | + return TRUE; |
|
32 | 32 | } |
33 | 33 | } |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | protected $_config; |
15 | 15 | protected $_projectPath; |
16 | 16 | |
17 | - protected function configure() |
|
18 | - { |
|
17 | + protected function configure() { |
|
19 | 18 | $this->_projectPath = getcwd(); |
20 | 19 | $this->setName("redis:flush-all"); |
21 | 20 | $this->setDescription("Flush redis storage"); |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @param OutputInterface $output |
27 | 26 | * @return ProcessCommand |
28 | 27 | */ |
29 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
30 | - { |
|
28 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
31 | 29 | $output->writeln('<info>Flushing Redis Storage</info>'); |
32 | 30 | |
33 | 31 | $command = "redis-cli flushall"; |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | protected $_config; |
17 | 17 | protected $_projectPath; |
18 | 18 | |
19 | - protected function configure() |
|
20 | - { |
|
19 | + protected function configure() { |
|
21 | 20 | $this->_projectPath = getcwd(); |
22 | 21 | $this->setName("index:mode:set"); |
23 | 22 | $this->setDescription("Set index mode type"); |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | * @param OutputInterface $output |
30 | 29 | * @return ProcessCommand |
31 | 30 | */ |
32 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
33 | - { |
|
31 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
34 | 32 | $mode = $input->getArgument('mode'); |
35 | 33 | $command = $this->getCommand(new Config($output), $mode); |
36 | 34 | if ($command) { |
@@ -47,8 +45,7 @@ discard block |
||
47 | 45 | * @param $mode |
48 | 46 | * @return bool|string |
49 | 47 | */ |
50 | - protected function getCommand(Config $config, $mode) |
|
51 | - { |
|
48 | + protected function getCommand(Config $config, $mode) { |
|
52 | 49 | $type = $config->type; |
53 | 50 | switch ($type) { |
54 | 51 | case 'magento2': |
@@ -36,7 +36,7 @@ |
||
36 | 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 |
@@ -52,6 +52,6 @@ |
||
52 | 52 | break; |
53 | 53 | } |
54 | 54 | |
55 | - return false; |
|
55 | + return FALSE; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
36 | 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 |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | protected $_config; |
17 | 17 | protected $_projectPath; |
18 | 18 | |
19 | - protected function configure() |
|
20 | - { |
|
19 | + protected function configure() { |
|
21 | 20 | $this->_projectPath = getcwd(); |
22 | 21 | $this->setName("index:reindex"); |
23 | 22 | $this->setDescription("Reindex data"); |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | * @param OutputInterface $output |
30 | 29 | * @return ProcessCommand |
31 | 30 | */ |
32 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
33 | - { |
|
31 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
34 | 32 | $output->writeln('<info>Reindexing data</info>'); |
35 | 33 | $index = $input->getArgument('index'); |
36 | 34 | |
@@ -44,8 +42,7 @@ discard block |
||
44 | 42 | * @param $index |
45 | 43 | * @return bool|string |
46 | 44 | */ |
47 | - protected function getCommand(Config $config, $index) |
|
48 | - { |
|
45 | + protected function getCommand(Config $config, $index) { |
|
49 | 46 | $type = $config->type; |
50 | 47 | switch ($type) { |
51 | 48 | case 'magento': |
@@ -52,6 +52,6 @@ |
||
52 | 52 | break; |
53 | 53 | } |
54 | 54 | |
55 | - return false; |
|
55 | + return FALSE; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |