Completed
Push — master ( 338c1f...de33f9 )
by Steven
02:49
created
src/Magestead/Exceptions/MissingComposerHomeException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,6 @@
 block discarded – undo
4 4
  * Class MissingComposerHomeException
5 5
  * @package Magestead\Exceptions
6 6
  */
7
-class MissingComposerHomeException extends \Exception {}
8 7
\ No newline at end of file
8
+class MissingComposerHomeException extends \Exception
9
+{
10
+}
9 11
\ No newline at end of file
Please login to merge, or discard this patch.
src/Magestead/Helper/Config.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct(OutputInterface $output)
25 25
     {
26
-        $this->_projectPath = getcwd();
27
-        $this->output = $output;
26
+        $this->_projectPath=getcwd();
27
+        $this->output=$output;
28 28
     }
29 29
 
30 30
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     function __get($name)
35 35
     {
36
-        $this->_config = $this->getConfigFile($this->output);
36
+        $this->_config=$this->getConfigFile($this->output);
37 37
         return $this->_config['magestead']['apps']['mba_12345'][$name];
38 38
     }
39 39
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     protected function getConfigFile(OutputInterface $output)
45 45
     {
46
-        $config = new Parser();
46
+        $config=new Parser();
47 47
         try {
48 48
             return $config->parse($this->readConfigFile());
49 49
         } catch (ParseException $e) {
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected function readConfigFile()
61 61
     {
62
-        if (!file_exists($this->_projectPath . '/magestead.yaml')) {
62
+        if (!file_exists($this->_projectPath.'/magestead.yaml')) {
63 63
             throw new MissingConfigFileException('No config file was found, are you in the project root?');
64 64
         }
65 65
 
66
-        return file_get_contents($this->_projectPath . '/magestead.yaml');
66
+        return file_get_contents($this->_projectPath.'/magestead.yaml');
67 67
     }
68 68
 
69 69
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function getComposerHomeDir()
76 76
     {
77
-        $composerConfig = shell_exec('composer config --list --global | grep home');
77
+        $composerConfig=shell_exec('composer config --list --global | grep home');
78 78
 
79 79
         if (is_null($composerConfig)) {
80 80
             throw new MissingComposerHomeException('Composer home directory is not found. Do you have it installed?');
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
      * Config constructor.
22 22
      * @param OutputInterface $output
23 23
      */
24
-    public function __construct(OutputInterface $output)
25
-    {
24
+    public function __construct(OutputInterface $output) {
26 25
         $this->_projectPath = getcwd();
27 26
         $this->output = $output;
28 27
     }
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
      * @param $name
32 31
      * @return mixed
33 32
      */
34
-    function __get($name)
35
-    {
33
+    function __get($name) {
36 34
         $this->_config = $this->getConfigFile($this->output);
37 35
         return $this->_config['magestead']['apps']['mba_12345'][$name];
38 36
     }
@@ -41,8 +39,7 @@  discard block
 block discarded – undo
41 39
      * @param OutputInterface $output
42 40
      * @return bool|mixed
43 41
      */
44
-    protected function getConfigFile(OutputInterface $output)
45
-    {
42
+    protected function getConfigFile(OutputInterface $output) {
46 43
         $config = new Parser();
47 44
         try {
48 45
             return $config->parse($this->readConfigFile());
@@ -57,8 +54,7 @@  discard block
 block discarded – undo
57 54
      * @return string
58 55
      * @throws MissingConfigFileException
59 56
      */
60
-    protected function readConfigFile()
61
-    {
57
+    protected function readConfigFile() {
62 58
         if (!file_exists($this->_projectPath . '/magestead.yaml')) {
63 59
             throw new MissingConfigFileException('No config file was found, are you in the project root?');
64 60
         }
@@ -72,8 +68,7 @@  discard block
 block discarded – undo
72 68
      * @return string
73 69
      * @throws MissingComposerHomeException
74 70
      */
75
-    public function getComposerHomeDir()
76
-    {
71
+    public function getComposerHomeDir() {
77 72
         $composerConfig = shell_exec('composer config --list --global | grep home');
78 73
 
79 74
         if (is_null($composerConfig)) {
Please login to merge, or discard this patch.
src/Magestead/Installers/Magento2Project.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function __construct(array $options, array $config, $projectPath, OutputInterface $output)
30 30
     {
31
-        $this->output = $output;
31
+        $this->output=$output;
32 32
         $this->composerInstall($projectPath, $output);
33 33
         $this->installMagento($config, $options, $projectPath, $output);
34 34
         $this->finaliseSetup($options, $projectPath, $output);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     protected function composerInstall($projectPath, OutputInterface $output)
45 45
     {
46 46
         $output->writeln('<info>Installing Magento 2 with Composer</info>');
47
-        $command = 'composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
47
+        $command='composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
48 48
         new ProcessCommand($command, $projectPath, $output);
49 49
 
50 50
         $this->copyAuthFile($projectPath);
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected function copyAuthFile($destination)
61 61
     {
62
-        $composerHome = (new Config($this->output))->getComposerHomeDir();
63
-        $authFile = $composerHome . "/auth.json";
62
+        $composerHome=(new Config($this->output))->getComposerHomeDir();
63
+        $authFile=$composerHome."/auth.json";
64 64
 
65
-        return copy($authFile, $destination . '/public/auth.json');
65
+        return copy($authFile, $destination.'/public/auth.json');
66 66
     }
67 67
 
68 68
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     protected function addPhpSpecPackage($projectPath, OutputInterface $output)
73 73
     {
74 74
         $output->writeln('<comment>Installing PHPSpec</comment>');
75
-        $command = 'cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
75
+        $command='cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
76 76
         new ProcessCommand($command, $projectPath, $output);
77 77
 
78 78
         $this->setPhpSpecPermissions($projectPath, $output);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     protected function addBehatPackage($projectPath, OutputInterface $output)
86 86
     {
87 87
         $output->writeln('<comment>Installing Behat</comment>');
88
-        $command = 'cd '.$projectPath.'/public; composer require behat/behat --dev;';
88
+        $command='cd '.$projectPath.'/public; composer require behat/behat --dev;';
89 89
         new ProcessCommand($command, $projectPath, $output);
90 90
 
91 91
         $this->setBehatPermissions($projectPath, $output);
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
         $this->installSampleData($options, $projectPath, $output);
105 105
 
106 106
         $output->writeln('<info>Installing Magento 2 Software</info>');
107
-        $locale           = $config['magestead']['apps']['mba_12345']['locale'];
108
-        $db_name          = $config['magestead']['apps']['mba_12345']['db_name'];
109
-        $base_url         = $config['magestead']['apps']['mba_12345']['base_url'];
110
-        $default_currency = $config['magestead']['apps']['mba_12345']['default_currency'];
107
+        $locale=$config['magestead']['apps']['mba_12345']['locale'];
108
+        $db_name=$config['magestead']['apps']['mba_12345']['db_name'];
109
+        $base_url=$config['magestead']['apps']['mba_12345']['base_url'];
110
+        $default_currency=$config['magestead']['apps']['mba_12345']['default_currency'];
111 111
 
112
-        $install = 'vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
112
+        $install='vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
113 113
 --db-host=localhost \
114 114
 --db-name='.$db_name.' \
115 115
 --db-user=magestead \
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         if (true === $options['installSampleData']) {
140 140
             $output->writeln('<info>Installing Magento 2 Sample Data</info>');
141
-            $deployCommand = 'vagrant ssh -c \'cd /var/www/public; bin/magento sampledata:deploy \'';
141
+            $deployCommand='vagrant ssh -c \'cd /var/www/public; bin/magento sampledata:deploy \'';
142 142
             new ProcessCommand($deployCommand, $projectPath, $output);
143 143
         }
144 144
     }
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
     protected function setPermissions($projectPath, OutputInterface $output)
151 151
     {
152 152
         $output->writeln('<info>Setting Permissions</info>');
153
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
153
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
154 154
         new ProcessCommand($command, $projectPath, $output);
155 155
         $output->writeln('<comment>Folder Permissions Set</comment>');
156 156
 
157
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
157
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
158 158
         new ProcessCommand($command, $projectPath, $output);
159 159
         $output->writeln('<comment>File Permissions Set</comment>');
160 160
 
161
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
161
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
162 162
         new ProcessCommand($command, $projectPath, $output);
163 163
         $output->writeln('<comment>bin/magento Permissions Set</comment>');
164 164
     }
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
     protected function configureRedis($projectPath, OutputInterface $output)
171 171
     {
172 172
         $output->writeln('<comment>Configuring Redis Cache</comment>');
173
-        $file = "$projectPath/public/app/etc/env.php";
174
-        $env  = include $file;
173
+        $file="$projectPath/public/app/etc/env.php";
174
+        $env=include $file;
175 175
 
176
-        $env['cache'] = [
176
+        $env['cache']=[
177 177
             'frontend' => [
178 178
                 'default' => [
179 179
                     'backend' => 'Cm_Cache_Backend_Redis',
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             ],
213 213
         ];
214 214
 
215
-        file_put_contents($file, "<?php \n \n return ".var_export($env,true).";");
215
+        file_put_contents($file, "<?php \n \n return ".var_export($env, true).";");
216 216
     }
217 217
 
218 218
     /**
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
      */
223 223
     protected function finaliseSetup(array $options, $projectPath, OutputInterface $output)
224 224
     {
225
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
225
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
226 226
         $output->writeln('<comment>Reindexing Tables</comment>');
227 227
         new ProcessCommand($command, $projectPath, $output);
228 228
 
229
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
229
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
230 230
         $output->writeln('<comment>Flushing All Cache</comment>');
231 231
         new ProcessCommand($command, $projectPath, $output);
232 232
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     protected function showCredentials(array $options, OutputInterface $output)
242 242
     {
243 243
         $output->writeln('<info>SUCCESS: Magestead has finished installing Magento 2!</info>');
244
-        $table = new Table($output);
244
+        $table=new Table($output);
245 245
         $table
246 246
             ->setHeaders(['Username', 'Password', 'Base URL', 'Admin URI'])
247 247
             ->setRows([
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     protected function processVcs(array $options, $projectPath, OutputInterface $output)
262 262
     {
263 263
         if (!empty($options['repo_url'])) {
264
-            copy($projectPath . "/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath . "/.gitignore");
264
+            copy($projectPath."/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath."/.gitignore");
265 265
             return new VersionControl($options['repo_url'], $projectPath, $output);
266 266
         }
267 267
     }
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
      */
272 272
     protected function setComposerBinDir($projectPath)
273 273
     {
274
-        $file     = "$projectPath/public/composer.json";
275
-        $composer = json_decode(file_get_contents($file), true);
274
+        $file="$projectPath/public/composer.json";
275
+        $composer=json_decode(file_get_contents($file), true);
276 276
 
277
-        $composer['config']['bin-dir'] = 'bin';
277
+        $composer['config']['bin-dir']='bin';
278 278
         file_put_contents($file, json_encode($composer));
279 279
     }
280 280
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     protected function setPhpSpecPermissions($projectPath, OutputInterface $output)
286 286
     {
287
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
287
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
288 288
         new ProcessCommand($command, $projectPath, $output);
289 289
     }
290 290
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      */
295 295
     protected function setBehatPermissions($projectPath, OutputInterface $output)
296 296
     {
297
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
297
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
298 298
         new ProcessCommand($command, $projectPath, $output);
299 299
     }
300 300
 }
301 301
\ No newline at end of file
Please login to merge, or discard this patch.
src/Magestead/Helper/Options.php 2 patches
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     protected $_currency;
29 29
     protected $_baseUrl;
30 30
     protected $_repoUrl = '';
31
-    protected $installSampleData = false;
31
+    protected $installSampleData = FALSE;
32 32
 
33 33
     /**
34 34
      * Options constructor.
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             return $this->verifyAuth($helper, $input, $output);
134 134
         }
135 135
 
136
-        return true;
136
+        return TRUE;
137 137
     }
138 138
 
139 139
     /**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output)
145 145
     {
146
-        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
146
+        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", FALSE);
147 147
         $versioning     = $helper->ask($input, $output, $versionControl);
148 148
         if ($versioning) {
149 149
             $repoQuestion   = new Question("Enter your full GitHub/BitBucket repo URL: ", '');
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     protected function installSampleData($helper, InputInterface $input, OutputInterface $output)
155 155
     {
156
-        $sampleInstall = new ConfirmationQuestion("Would you like to install sample data? (no/yes) ", false);
156
+        $sampleInstall = new ConfirmationQuestion("Would you like to install sample data? (no/yes) ", FALSE);
157 157
         $this->installSampleData = $helper->ask($input, $output, $sampleInstall);
158 158
     }
159 159
 
@@ -184,10 +184,10 @@  discard block
 block discarded – undo
184 184
         $authObj = [];
185 185
         if (file_exists($authFile)) {
186 186
             $authJson = file_get_contents($authFile);
187
-            $authObj  = (array)json_decode($authJson, true);
187
+            $authObj  = (array)json_decode($authJson, TRUE);
188 188
 
189 189
             if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) {
190
-                return true;
190
+                return TRUE;
191 191
             }
192 192
         }
193 193
 
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
  */
13 13
 class Options
14 14
 {
15
-    const BOX_PREFIX = 'richdynamix/magestead-';
15
+    const BOX_PREFIX='richdynamix/magestead-';
16 16
 
17
-    protected $_app = 'magento2';
18
-    protected $_phpVer = '56';
19
-    protected $_os = 'centos65';
17
+    protected $_app='magento2';
18
+    protected $_phpVer='56';
19
+    protected $_os='centos65';
20 20
     protected $_server;
21 21
     protected $_box;
22 22
     protected $_m2Username;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     protected $_locale;
28 28
     protected $_currency;
29 29
     protected $_baseUrl;
30
-    protected $_repoUrl = '';
31
-    protected $installSampleData = false;
30
+    protected $_repoUrl='';
31
+    protected $installSampleData=false;
32 32
 
33 33
     /**
34 34
      * Options constructor.
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $output->writeln('<comment>Lets configure your project\'s VM</comment>');
85 85
 
86
-        $ipQuestion       = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47');
87
-        $this->_ipAddress = strtolower($helper->ask($input, $output, $ipQuestion));
86
+        $ipQuestion=new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47');
87
+        $this->_ipAddress=strtolower($helper->ask($input, $output, $ipQuestion));
88 88
 
89
-        $cpuQuestion = new Question("How many CPU's would you like to use? (1): ", '1');
90
-        $this->_cpus = strtolower($helper->ask($input, $output, $cpuQuestion));
89
+        $cpuQuestion=new Question("How many CPU's would you like to use? (1): ", '1');
90
+        $this->_cpus=strtolower($helper->ask($input, $output, $cpuQuestion));
91 91
 
92
-        $memoryQuestion     = new Question("Define the VM memory limit (2048): ", '2048');
93
-        $this->_memorylimit = strtolower($helper->ask($input, $output, $memoryQuestion));
92
+        $memoryQuestion=new Question("Define the VM memory limit (2048): ", '2048');
93
+        $this->_memorylimit=strtolower($helper->ask($input, $output, $memoryQuestion));
94 94
     }
95 95
 
96 96
     /**
@@ -102,22 +102,22 @@  discard block
 block discarded – undo
102 102
     protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project)
103 103
     {
104 104
         $output->writeln('<comment>Lets configure your project\'s application</comment>');
105
-        $appQuestion = new ChoiceQuestion(
105
+        $appQuestion=new ChoiceQuestion(
106 106
             "Which application do you want to install?",
107 107
             ['Magento', 'Magento2'],
108 108
             0
109 109
         );
110 110
 
111
-        $this->_app = strtolower($helper->ask($input, $output, $appQuestion));
111
+        $this->_app=strtolower($helper->ask($input, $output, $appQuestion));
112 112
 
113
-        $baseUrlQuestion = new Question("Enter your application's base_url ($project.dev): ", $project.'.dev');
114
-        $this->_baseUrl  = strtolower($helper->ask($input, $output, $baseUrlQuestion));
113
+        $baseUrlQuestion=new Question("Enter your application's base_url ($project.dev): ", $project.'.dev');
114
+        $this->_baseUrl=strtolower($helper->ask($input, $output, $baseUrlQuestion));
115 115
 
116
-        $currenyQuestion = new Question("Enter your application's default currency (GBP): ", 'GBP');
117
-        $this->_currency = $helper->ask($input, $output, $currenyQuestion);
116
+        $currenyQuestion=new Question("Enter your application's default currency (GBP): ", 'GBP');
117
+        $this->_currency=$helper->ask($input, $output, $currenyQuestion);
118 118
 
119
-        $localeQuestion = new Question("Enter your application's default locale (en_GB): ", 'en_GB');
120
-        $this->_locale  = $helper->ask($input, $output, $localeQuestion);
119
+        $localeQuestion=new Question("Enter your application's default locale (en_GB): ", 'en_GB');
120
+        $this->_locale=$helper->ask($input, $output, $localeQuestion);
121 121
     }
122 122
 
123 123
     /**
@@ -143,18 +143,18 @@  discard block
 block discarded – undo
143 143
      */
144 144
     protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output)
145 145
     {
146
-        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
147
-        $versioning     = $helper->ask($input, $output, $versionControl);
146
+        $versionControl=new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
147
+        $versioning=$helper->ask($input, $output, $versionControl);
148 148
         if ($versioning) {
149
-            $repoQuestion   = new Question("Enter your full GitHub/BitBucket repo URL: ", '');
150
-            $this->_repoUrl = strtolower($helper->ask($input, $output, $repoQuestion));
149
+            $repoQuestion=new Question("Enter your full GitHub/BitBucket repo URL: ", '');
150
+            $this->_repoUrl=strtolower($helper->ask($input, $output, $repoQuestion));
151 151
         }
152 152
     }
153 153
 
154 154
     protected function installSampleData($helper, InputInterface $input, OutputInterface $output)
155 155
     {
156
-        $sampleInstall = new ConfirmationQuestion("Would you like to install sample data? (no/yes) ", false);
157
-        $this->installSampleData = $helper->ask($input, $output, $sampleInstall);
156
+        $sampleInstall=new ConfirmationQuestion("Would you like to install sample data? (no/yes) ", false);
157
+        $this->installSampleData=$helper->ask($input, $output, $sampleInstall);
158 158
     }
159 159
 
160 160
     /**
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
      */
165 165
     protected function askForAuth($helper, InputInterface $input, OutputInterface $output)
166 166
     {
167
-        $username          = new Question("Please enter your Magento username (public key): ", '');
168
-        $this->_m2Username = $helper->ask($input, $output, $username);
167
+        $username=new Question("Please enter your Magento username (public key): ", '');
168
+        $this->_m2Username=$helper->ask($input, $output, $username);
169 169
 
170
-        $password          = new Question("Please enter your Magento password (private key): ", '');
171
-        $this->_m2Password = $helper->ask($input, $output, $password);
170
+        $password=new Question("Please enter your Magento password (private key): ", '');
171
+        $this->_m2Password=$helper->ask($input, $output, $password);
172 172
     }
173 173
 
174 174
     /**
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
      */
180 180
     protected function verifyAuth($helper, InputInterface $input, OutputInterface $output)
181 181
     {
182
-        $composerHome = (new Config($output))->getComposerHomeDir();
183
-        $authFile = $composerHome . "/auth.json";
182
+        $composerHome=(new Config($output))->getComposerHomeDir();
183
+        $authFile=$composerHome."/auth.json";
184 184
 
185
-        $authObj = [];
185
+        $authObj=[];
186 186
         if (file_exists($authFile)) {
187
-            $authJson = file_get_contents($authFile);
188
-            $authObj  = (array)json_decode($authJson, true);
187
+            $authJson=file_get_contents($authFile);
188
+            $authObj=(array) json_decode($authJson, true);
189 189
 
190 190
             if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) {
191 191
                 return true;
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
 
195 195
         $this->askForAuth($helper, $input, $output);
196 196
 
197
-        $authObj['http-basic']['repo.magento.com']['username'] = $this->_m2Username;
198
-        $authObj['http-basic']['repo.magento.com']['password'] = $this->_m2Password;
197
+        $authObj['http-basic']['repo.magento.com']['username']=$this->_m2Username;
198
+        $authObj['http-basic']['repo.magento.com']['password']=$this->_m2Password;
199 199
 
200
-        $authJson = json_encode($authObj);
200
+        $authJson=json_encode($authObj);
201 201
         return file_put_contents($authFile, $authJson);
202 202
     }
203 203
 
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
      */
209 209
     protected function setPhp($helper, InputInterface $input, OutputInterface $output)
210 210
     {
211
-        $phpVerQuestion = new ChoiceQuestion(
211
+        $phpVerQuestion=new ChoiceQuestion(
212 212
             "Which version of PHP should be installed?",
213 213
             ['56', '70'],
214 214
             0
215 215
         );
216 216
 
217
-        $this->_phpVer = $helper->ask($input, $output, $phpVerQuestion);
217
+        $this->_phpVer=$helper->ask($input, $output, $phpVerQuestion);
218 218
     }
219 219
 
220 220
     /**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     protected function setVagrantBox()
224 224
     {
225
-        $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer";
225
+        $this->_box=self::BOX_PREFIX.$this->_os."-$this->_server-php$this->_phpVer";
226 226
     }
227 227
 
228 228
     /**
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
      */
246 246
     protected function setWebServer($helper, InputInterface $input, OutputInterface $output)
247 247
     {
248
-        $serverQuestion = new ChoiceQuestion(
248
+        $serverQuestion=new ChoiceQuestion(
249 249
             "Which webserver would you like?",
250 250
             ['NGINX', 'Apache'],
251 251
             0
252 252
         );
253 253
 
254
-        $this->_server = strtolower($helper->ask($input, $output, $serverQuestion));
254
+        $this->_server=strtolower($helper->ask($input, $output, $serverQuestion));
255 255
     }
256 256
 
257 257
     /**
@@ -261,12 +261,12 @@  discard block
 block discarded – undo
261 261
      */
262 262
     protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output)
263 263
     {
264
-        $osQuestion = new ChoiceQuestion(
264
+        $osQuestion=new ChoiceQuestion(
265 265
             "Which OS would you like to install?",
266 266
             ['CentOS 6.5', 'Ubuntu 14'],
267 267
             0
268 268
         );
269 269
 
270
-        $this->_os = str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion))));
270
+        $this->_os=str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion))));
271 271
     }
272 272
 }
Please login to merge, or discard this patch.