@@ -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'], |
@@ -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); |