@@ -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"; |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -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': |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @param OutputInterface $output |
28 | 27 | * @return ProcessCommand |
29 | 28 | */ |
30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
31 | - { |
|
29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
33 | 31 | |
34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * @param Config $config |
41 | 39 | * @return bool|string |
42 | 40 | */ |
43 | - protected function getCommand(Config $config) |
|
44 | - { |
|
41 | + protected function getCommand(Config $config) { |
|
45 | 42 | $type = $config->type; |
46 | 43 | switch ($type) { |
47 | 44 | case 'magento': |
@@ -36,8 +36,7 @@ discard block |
||
36 | 36 | * @param OutputInterface $output |
37 | 37 | * @param $project |
38 | 38 | */ |
39 | - public function __construct($helper, InputInterface $input, OutputInterface $output, $project) |
|
40 | - { |
|
39 | + public function __construct($helper, InputInterface $input, OutputInterface $output, $project) { |
|
41 | 40 | $this->setVagrantSettings($helper, $input, $output); |
42 | 41 | |
43 | 42 | $this->setServerConfig($helper, $input, $output); |
@@ -52,8 +51,7 @@ discard block |
||
52 | 51 | /** |
53 | 52 | * @return array |
54 | 53 | */ |
55 | - public function getAllOptions() |
|
56 | - { |
|
54 | + public function getAllOptions() { |
|
57 | 55 | return [ |
58 | 56 | 'app' => $this->_app, |
59 | 57 | 'server' => $this->_server, |
@@ -77,8 +75,7 @@ discard block |
||
77 | 75 | * @param InputInterface $input |
78 | 76 | * @param OutputInterface $output |
79 | 77 | */ |
80 | - protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) |
|
81 | - { |
|
78 | + protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) { |
|
82 | 79 | $output->writeln('<comment>Lets configure your project\'s VM</comment>'); |
83 | 80 | |
84 | 81 | $ipQuestion = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47'); |
@@ -97,8 +94,7 @@ discard block |
||
97 | 94 | * @param OutputInterface $output |
98 | 95 | * @param $project |
99 | 96 | */ |
100 | - protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project) |
|
101 | - { |
|
97 | + protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project) { |
|
102 | 98 | $output->writeln('<comment>Lets configure your project\'s application</comment>'); |
103 | 99 | if ($this->_phpVer !== '70') { |
104 | 100 | $appQuestion = new ChoiceQuestion( |
@@ -126,8 +122,7 @@ discard block |
||
126 | 122 | * @param OutputInterface $output |
127 | 123 | * @return boolean|integer |
128 | 124 | */ |
129 | - protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) |
|
130 | - { |
|
125 | + protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) { |
|
131 | 126 | if ($this->_app === 'magento2') { |
132 | 127 | return $this->verifyAuth($helper, $input, $output); |
133 | 128 | } |
@@ -140,8 +135,7 @@ discard block |
||
140 | 135 | * @param InputInterface $input |
141 | 136 | * @param OutputInterface $output |
142 | 137 | */ |
143 | - protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) |
|
144 | - { |
|
138 | + protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) { |
|
145 | 139 | $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
146 | 140 | $versioning = $helper->ask($input, $output, $versionControl); |
147 | 141 | if ($versioning) { |
@@ -155,8 +149,7 @@ discard block |
||
155 | 149 | * @param InputInterface $input |
156 | 150 | * @param OutputInterface $output |
157 | 151 | */ |
158 | - protected function askForAuth($helper, InputInterface $input, OutputInterface $output) |
|
159 | - { |
|
152 | + protected function askForAuth($helper, InputInterface $input, OutputInterface $output) { |
|
160 | 153 | $username = new Question("Please enter your Magento username (public key): ", ''); |
161 | 154 | $this->_m2Username = $helper->ask($input, $output, $username); |
162 | 155 | |
@@ -170,8 +163,7 @@ discard block |
||
170 | 163 | * @param OutputInterface $output |
171 | 164 | * @return boolean|integer |
172 | 165 | */ |
173 | - protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) |
|
174 | - { |
|
166 | + protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) { |
|
175 | 167 | $authFile = $_SERVER['HOME'] . "/.composer/auth.json"; |
176 | 168 | |
177 | 169 | $authObj = []; |
@@ -198,8 +190,7 @@ discard block |
||
198 | 190 | * @param InputInterface $input |
199 | 191 | * @param OutputInterface $output |
200 | 192 | */ |
201 | - protected function setPhp($helper, InputInterface $input, OutputInterface $output) |
|
202 | - { |
|
193 | + protected function setPhp($helper, InputInterface $input, OutputInterface $output) { |
|
203 | 194 | $output->writeln('<info>Keep in mind PHP7 is only available for Magento 2</info>'); |
204 | 195 | $phpVerQuestion = new ChoiceQuestion( |
205 | 196 | "Which version of PHP should be installed?", |
@@ -213,8 +204,7 @@ discard block |
||
213 | 204 | /** |
214 | 205 | * Set box name from concat user options |
215 | 206 | */ |
216 | - protected function setVagrantBox() |
|
217 | - { |
|
207 | + protected function setVagrantBox() { |
|
218 | 208 | $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer"; |
219 | 209 | } |
220 | 210 | |
@@ -223,8 +213,7 @@ discard block |
||
223 | 213 | * @param InputInterface $input |
224 | 214 | * @param OutputInterface $output |
225 | 215 | */ |
226 | - protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) |
|
227 | - { |
|
216 | + protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) { |
|
228 | 217 | $output->writeln('<comment>Lets configure your server</comment>'); |
229 | 218 | $this->setOperatingSystem($helper, $input, $output); |
230 | 219 | $this->setWebServer($helper, $input, $output); |
@@ -236,8 +225,7 @@ discard block |
||
236 | 225 | * @param InputInterface $input |
237 | 226 | * @param OutputInterface $output |
238 | 227 | */ |
239 | - protected function setWebServer($helper, InputInterface $input, OutputInterface $output) |
|
240 | - { |
|
228 | + protected function setWebServer($helper, InputInterface $input, OutputInterface $output) { |
|
241 | 229 | $serverQuestion = new ChoiceQuestion( |
242 | 230 | "Which webserver would you like?", |
243 | 231 | ['NGINX', 'Apache'], |
@@ -252,8 +240,7 @@ discard block |
||
252 | 240 | * @param InputInterface $input |
253 | 241 | * @param OutputInterface $output |
254 | 242 | */ |
255 | - protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) |
|
256 | - { |
|
243 | + protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) { |
|
257 | 244 | $osQuestion = new ChoiceQuestion( |
258 | 245 | "Which OS would you like to install?", |
259 | 246 | ['CentOS 6.5', 'Ubuntu 14'], |