1 | <?php namespace Magestead\Helper; |
||
13 | class Options |
||
14 | { |
||
15 | const BOX_PREFIX = 'richdynamix/magestead-'; |
||
16 | |||
17 | protected $_app = 'magento2'; |
||
|
|||
18 | protected $_phpVer = '56'; |
||
19 | protected $_os = 'centos65'; |
||
20 | protected $_server; |
||
21 | protected $_box; |
||
22 | protected $_m2Username; |
||
23 | protected $_m2Password; |
||
24 | protected $_ipAddress; |
||
25 | protected $_memorylimit; |
||
26 | protected $_cpus; |
||
27 | protected $_locale; |
||
28 | protected $_currency; |
||
29 | protected $_baseUrl; |
||
30 | protected $_repoUrl = ''; |
||
31 | |||
32 | /** |
||
33 | * Options constructor. |
||
34 | * @param $helper |
||
35 | * @param InputInterface $input |
||
36 | * @param OutputInterface $output |
||
37 | */ |
||
38 | public function __construct($helper, InputInterface $input, OutputInterface $output) |
||
51 | /** |
||
52 | * @return array |
||
53 | */ |
||
54 | public function getAllOptions() |
||
73 | |||
74 | /** |
||
75 | * @param $helper |
||
76 | * @param InputInterface $input |
||
77 | * @param OutputInterface $output |
||
78 | */ |
||
79 | protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) |
||
92 | |||
93 | /** |
||
94 | * @param $helper |
||
95 | * @param InputInterface $input |
||
96 | * @param OutputInterface $output |
||
97 | */ |
||
98 | protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output) |
||
120 | |||
121 | /** |
||
122 | * @param $helper |
||
123 | * @param InputInterface $input |
||
124 | * @param OutputInterface $output |
||
125 | * @return boolean|integer |
||
126 | */ |
||
127 | protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) |
||
135 | |||
136 | /** |
||
137 | * @param $helper |
||
138 | * @param InputInterface $input |
||
139 | * @param OutputInterface $output |
||
140 | */ |
||
141 | protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) |
||
142 | { |
||
143 | $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false); |
||
144 | $versioning = $helper->ask($input, $output, $versionControl); |
||
145 | if ($versioning) { |
||
146 | $repoQuestion = new Question("Enter your full GitHub/BitBucket repo URL: ", ''); |
||
147 | $this->_repoUrl = strtolower($helper->ask($input, $output, $repoQuestion)); |
||
148 | } |
||
149 | } |
||
150 | |||
151 | /** |
||
152 | * @param $helper |
||
153 | * @param InputInterface $input |
||
154 | * @param OutputInterface $output |
||
155 | */ |
||
156 | protected function askForAuth($helper, InputInterface $input, OutputInterface $output) |
||
164 | |||
165 | /** |
||
166 | * @param $helper |
||
167 | * @param InputInterface $input |
||
168 | * @param OutputInterface $output |
||
169 | * @return boolean|integer |
||
170 | */ |
||
171 | protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) |
||
193 | |||
194 | /** |
||
195 | * @param $helper |
||
196 | * @param InputInterface $input |
||
197 | * @param OutputInterface $output |
||
198 | */ |
||
199 | protected function setPhp($helper, InputInterface $input, OutputInterface $output) |
||
210 | |||
211 | /** |
||
212 | * Set box name from concat user options |
||
213 | */ |
||
214 | protected function setVagrantBox() |
||
218 | |||
219 | /** |
||
220 | * @param $helper |
||
221 | * @param InputInterface $input |
||
222 | * @param OutputInterface $output |
||
223 | */ |
||
224 | protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) |
||
231 | |||
232 | /** |
||
233 | * @param $helper |
||
234 | * @param InputInterface $input |
||
235 | * @param OutputInterface $output |
||
236 | */ |
||
237 | protected function setWebServer($helper, InputInterface $input, OutputInterface $output) |
||
247 | |||
248 | /** |
||
249 | * @param $helper |
||
250 | * @param InputInterface $input |
||
251 | * @param OutputInterface $output |
||
252 | */ |
||
253 | protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) |
||
263 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.