Completed
Push — analysis-zGPgQ2 ( 3b9df4 )
by Steven
02:50
created
src/Magestead/Helper/HostsPluginChecker.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public static function verify(array $options, OutputInterface $output)
17 17
     {
18
-        $hostPlugin = `vagrant plugin list | grep vagrant-hostsupdater`;
18
+        $hostPlugin=`vagrant plugin list | grep vagrant-hostsupdater`;
19 19
         if (is_null($hostPlugin)) {
20 20
             self::editHostsInstructions($options, $output);
21 21
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     protected static function editHostsInstructions(array $options, OutputInterface $output)
34 34
     {
35 35
         $output->writeln('<comment>NOTE: You will need to add the following to your hosts file!</comment>');
36
-        $comment = $options['vagrantfile']['vm']['network']['private_network'].
36
+        $comment=$options['vagrantfile']['vm']['network']['private_network'].
37 37
             ' '.$options['magestead']['apps']['mba_12345']['base_url'];
38 38
         $output->writeln('<info>'.$comment.'</info>');
39 39
     }
Please login to merge, or discard this patch.
src/Magestead/Installers/Magento2Project.php 3 patches
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     protected function composerInstall($projectPath, OutputInterface $output)
40 40
     {
41 41
         $output->writeln('<info>Installing Magento 2 with Composer</info>');
42
-        $command = 'composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
42
+        $command='composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
43 43
         new ProcessCommand($command, $projectPath, $output);
44 44
 
45 45
         $this->setComposerBinDir($projectPath);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     protected function addPhpSpecPackage($projectPath, OutputInterface $output)
55 55
     {
56 56
         $output->writeln('<comment>Installing PHPSpec</comment>');
57
-        $command = 'cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
57
+        $command='cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
58 58
         new ProcessCommand($command, $projectPath, $output);
59 59
 
60 60
         $this->setPhpSpecPermissions($projectPath, $output);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     protected function addBehatPackage($projectPath, OutputInterface $output)
68 68
     {
69 69
         $output->writeln('<comment>Installing Behat</comment>');
70
-        $command = 'cd '.$projectPath.'/public; composer require behat/behat --dev;';
70
+        $command='cd '.$projectPath.'/public; composer require behat/behat --dev;';
71 71
         new ProcessCommand($command, $projectPath, $output);
72 72
 
73 73
         $this->setBehatPermissions($projectPath, $output);
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $this->setPermissions($projectPath, $output);
84 84
 
85 85
         $output->writeln('<info>Installing Magento 2 Software</info>');
86
-        $locale = $options['magestead']['apps']['mba_12345']['locale'];
87
-        $db_name = $options['magestead']['apps']['mba_12345']['db_name'];
88
-        $base_url = $options['magestead']['apps']['mba_12345']['base_url'];
89
-        $default_currency = $options['magestead']['apps']['mba_12345']['default_currency'];
86
+        $locale=$options['magestead']['apps']['mba_12345']['locale'];
87
+        $db_name=$options['magestead']['apps']['mba_12345']['db_name'];
88
+        $base_url=$options['magestead']['apps']['mba_12345']['base_url'];
89
+        $default_currency=$options['magestead']['apps']['mba_12345']['default_currency'];
90 90
 
91
-        $install = 'vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
91
+        $install='vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
92 92
 --db-host=localhost \
93 93
 --db-name='.$db_name.' \
94 94
 --db-user=magestead \
@@ -115,15 +115,15 @@  discard block
 block discarded – undo
115 115
     protected function setPermissions($projectPath, OutputInterface $output)
116 116
     {
117 117
         $output->writeln('<info>Setting Permissions</info>');
118
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
118
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
119 119
         new ProcessCommand($command, $projectPath, $output);
120 120
         $output->writeln('<comment>Folder Permissions Set</comment>');
121 121
 
122
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
122
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
123 123
         new ProcessCommand($command, $projectPath, $output);
124 124
         $output->writeln('<comment>File Permissions Set</comment>');
125 125
 
126
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
126
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
127 127
         new ProcessCommand($command, $projectPath, $output);
128 128
         $output->writeln('<comment>bin/magento Permissions Set</comment>');
129 129
     }
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
     protected function configureRedis($projectPath, OutputInterface $output)
136 136
     {
137 137
         $output->writeln('<comment>Configuring Redis Cache</comment>');
138
-        $file = "$projectPath/public/app/etc/env.php";
139
-        $env = include $file;
138
+        $file="$projectPath/public/app/etc/env.php";
139
+        $env=include $file;
140 140
 
141
-        $env['cache'] = [
141
+        $env['cache']=[
142 142
             'frontend' => [
143 143
                 'default' => [
144 144
                     'backend'         => 'Cm_Cache_Backend_Redis',
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
      */
188 188
     protected function finaliseSetup(array $options, $projectPath, OutputInterface $output)
189 189
     {
190
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
190
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
191 191
         $output->writeln('<comment>Reindexing Tables</comment>');
192 192
         new ProcessCommand($command, $projectPath, $output);
193 193
 
194
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
194
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
195 195
         $output->writeln('<comment>Flushing All Cache</comment>');
196 196
         new ProcessCommand($command, $projectPath, $output);
197 197
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     protected function showCredentials(array $options, OutputInterface $output)
207 207
     {
208 208
         $output->writeln('<info>SUCCESS: Magestead has finished installing Magento 2!</info>');
209
-        $table = new Table($output);
209
+        $table=new Table($output);
210 210
         $table
211 211
             ->setHeaders(['Username', 'Password', 'Base URL', 'Admin URI'])
212 212
             ->setRows([
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
      */
239 239
     protected function setComposerBinDir($projectPath)
240 240
     {
241
-        $file = "$projectPath/public/composer.json";
242
-        $composer = json_decode(file_get_contents($file), true);
241
+        $file="$projectPath/public/composer.json";
242
+        $composer=json_decode(file_get_contents($file), true);
243 243
 
244
-        $composer['config']['bin-dir'] = 'bin';
244
+        $composer['config']['bin-dir']='bin';
245 245
         file_put_contents($file, json_encode($composer));
246 246
     }
247 247
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     protected function setPhpSpecPermissions($projectPath, OutputInterface $output)
253 253
     {
254
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
254
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
255 255
         new ProcessCommand($command, $projectPath, $output);
256 256
     }
257 257
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     protected function setBehatPermissions($projectPath, OutputInterface $output)
263 263
     {
264
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
264
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
265 265
         new ProcessCommand($command, $projectPath, $output);
266 266
     }
267 267
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             ],
178 178
         ];
179 179
 
180
-        file_put_contents($file, "<?php \n \n return ".var_export($env, true).';');
180
+        file_put_contents($file, "<?php \n \n return ".var_export($env, TRUE).';');
181 181
     }
182 182
 
183 183
     /**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     protected function setComposerBinDir($projectPath)
240 240
     {
241 241
         $file = "$projectPath/public/composer.json";
242
-        $composer = json_decode(file_get_contents($file), true);
242
+        $composer = json_decode(file_get_contents($file), TRUE);
243 243
 
244 244
         $composer['config']['bin-dir'] = 'bin';
245 245
         file_put_contents($file, json_encode($composer));
Please login to merge, or discard this patch.
src/Magestead/Installers/MagentoProject.php 3 patches
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
58 58
                 break;
59 59
         }
60 60
 
61
-        return false;
61
+        return FALSE;
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function installMagento(array $options, $projectPath, OutputInterface $output)
52 52
     {
53
-        $locale = $options['magestead']['apps']['mba_12345']['locale'];
54
-        $db_name = $options['magestead']['apps']['mba_12345']['db_name'];
55
-        $base_url = $options['magestead']['apps']['mba_12345']['base_url'];
56
-        $default_currency = $options['magestead']['apps']['mba_12345']['default_currency'];
53
+        $locale=$options['magestead']['apps']['mba_12345']['locale'];
54
+        $db_name=$options['magestead']['apps']['mba_12345']['db_name'];
55
+        $base_url=$options['magestead']['apps']['mba_12345']['base_url'];
56
+        $default_currency=$options['magestead']['apps']['mba_12345']['default_currency'];
57 57
 
58
-        $install = 'vagrant ssh -c \'cd /var/www/public; php -f install.php -- \
58
+        $install='vagrant ssh -c \'cd /var/www/public; php -f install.php -- \
59 59
 --license_agreement_accepted "yes" \
60 60
 --locale "'.$locale.'" \
61 61
 --timezone "Europe/London" \
@@ -90,27 +90,27 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function setPermissions($projectPath, OutputInterface $output)
92 92
     {
93
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\'';
93
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\'';
94 94
         $output->writeln('<comment>Setting "var" Files Permissions</comment>');
95 95
         new ProcessCommand($command, $projectPath, $output);
96 96
 
97
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\'';
97
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\'';
98 98
         $output->writeln('<comment>Setting "media" Files Permissions</comment>');
99 99
         new ProcessCommand($command, $projectPath, $output);
100 100
 
101
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\'';
101
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\'';
102 102
         $output->writeln('<comment>Setting "var" Folder Permissions</comment>');
103 103
         new ProcessCommand($command, $projectPath, $output);
104 104
 
105
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\'';
105
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\'';
106 106
         $output->writeln('<comment>Setting "media" Folder Permissions</comment>');
107 107
         new ProcessCommand($command, $projectPath, $output);
108 108
 
109
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\'';
109
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\'';
110 110
         $output->writeln('<comment>Setting "includes" Permissions</comment>');
111 111
         new ProcessCommand($command, $projectPath, $output);
112 112
 
113
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\'';
113
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\'';
114 114
         $output->writeln('<comment>Setting "includes/config.php" Permissions</comment>');
115 115
         new ProcessCommand($command, $projectPath, $output);
116 116
     }
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
      */
122 122
     protected function installMagerun($projectPath, OutputInterface $output)
123 123
     {
124
-        $command = 'vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\'';
124
+        $command='vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\'';
125 125
         $output->writeln('<info>Downloading Magerun</info>');
126 126
         new ProcessCommand($command, $projectPath, $output);
127 127
 
128
-        $command = 'vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\'';
128
+        $command='vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\'';
129 129
         $output->writeln('<comment>Setting Magerun Permissions</comment>');
130 130
         new ProcessCommand($command, $projectPath, $output);
131 131
     }
@@ -137,21 +137,21 @@  discard block
 block discarded – undo
137 137
      */
138 138
     protected function finaliseSetup(array $options, $projectPath, OutputInterface $output)
139 139
     {
140
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\'';
140
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\'';
141 141
         $output->writeln('<comment>Reindexing Tables</comment>');
142 142
         new ProcessCommand($command, $projectPath, $output);
143 143
 
144
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\'';
144
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\'';
145 145
         $output->writeln('<comment>Enabling All Cache</comment>');
146 146
         new ProcessCommand($command, $projectPath, $output);
147 147
 
148
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\'';
148
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\'';
149 149
         $output->writeln('<comment>Flushing All Cache</comment>');
150 150
         new ProcessCommand($command, $projectPath, $output);
151 151
 
152 152
         $this->processVcs($options, $projectPath, $output);
153 153
 
154
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\'';
154
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\'';
155 155
         $output->writeln('<comment>System Check</comment>');
156 156
         new ProcessCommand($command, $projectPath, $output);
157 157
     }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     protected function showCredentials(array $options, OutputInterface $output)
164 164
     {
165 165
         $output->writeln('<info>SUCCESS: Magestead has finished installing Magento!</info>');
166
-        $table = new Table($output);
166
+        $table=new Table($output);
167 167
         $table
168 168
             ->setHeaders(['Username', 'Password', 'Base URL'])
169 169
             ->setRows([
@@ -214,29 +214,29 @@  discard block
 block discarded – undo
214 214
      */
215 215
     protected function updateConfigXml($projectPath)
216 216
     {
217
-        $localFile = '/public/app/etc/local.xml';
218
-        $localXml = file_get_contents($projectPath.$localFile);
219
-
220
-        $config = new \SimpleXMLElement($localXml);
221
-
222
-        $config->global[0]->redis_session[0]->host = '127.0.0.1';
223
-        $config->global[0]->redis_session[0]->port = '6379';
224
-        $config->global[0]->redis_session[0]->password = '';
225
-        $config->global[0]->redis_session[0]->timeout = '2.5';
226
-        $config->global[0]->redis_session[0]->persistent = '';
227
-        $config->global[0]->redis_session[0]->db = '';
228
-        $config->global[0]->redis_session[0]->compression_threshold = '2048';
229
-        $config->global[0]->redis_session[0]->compression_lib = 'gzip';
230
-        $config->global[0]->redis_session[0]->log_level = '1';
231
-        $config->global[0]->redis_session[0]->max_concurrency = '6';
232
-        $config->global[0]->redis_session[0]->break_after_frontend = '5';
233
-        $config->global[0]->redis_session[0]->break_after_adminhtml = '30';
234
-        $config->global[0]->redis_session[0]->first_lifetime = '600';
235
-        $config->global[0]->redis_session[0]->bot_first_lifetime = '60';
236
-        $config->global[0]->redis_session[0]->bot_lifetime = '7200';
237
-        $config->global[0]->redis_session[0]->disable_locking = '0';
238
-        $config->global[0]->redis_session[0]->min_lifetime = '60';
239
-        $config->global[0]->redis_session[0]->max_lifetime = '2592000';
217
+        $localFile='/public/app/etc/local.xml';
218
+        $localXml=file_get_contents($projectPath.$localFile);
219
+
220
+        $config=new \SimpleXMLElement($localXml);
221
+
222
+        $config->global[0]->redis_session[0]->host='127.0.0.1';
223
+        $config->global[0]->redis_session[0]->port='6379';
224
+        $config->global[0]->redis_session[0]->password='';
225
+        $config->global[0]->redis_session[0]->timeout='2.5';
226
+        $config->global[0]->redis_session[0]->persistent='';
227
+        $config->global[0]->redis_session[0]->db='';
228
+        $config->global[0]->redis_session[0]->compression_threshold='2048';
229
+        $config->global[0]->redis_session[0]->compression_lib='gzip';
230
+        $config->global[0]->redis_session[0]->log_level='1';
231
+        $config->global[0]->redis_session[0]->max_concurrency='6';
232
+        $config->global[0]->redis_session[0]->break_after_frontend='5';
233
+        $config->global[0]->redis_session[0]->break_after_adminhtml='30';
234
+        $config->global[0]->redis_session[0]->first_lifetime='600';
235
+        $config->global[0]->redis_session[0]->bot_first_lifetime='60';
236
+        $config->global[0]->redis_session[0]->bot_lifetime='7200';
237
+        $config->global[0]->redis_session[0]->disable_locking='0';
238
+        $config->global[0]->redis_session[0]->min_lifetime='60';
239
+        $config->global[0]->redis_session[0]->max_lifetime='2592000';
240 240
 
241 241
         file_put_contents($projectPath.$localFile, $config->asXML());
242 242
     }
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
      */
247 247
     protected function activateModule($projectPath)
248 248
     {
249
-        $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml';
250
-        $moduleXml = file_get_contents($projectPath.$moduleFile);
251
-        $config = new \SimpleXMLElement($moduleXml);
249
+        $moduleFile='/public/app/etc/modules/Cm_RedisSession.xml';
250
+        $moduleXml=file_get_contents($projectPath.$moduleFile);
251
+        $config=new \SimpleXMLElement($moduleXml);
252 252
 
253
-        $config->modules[0]->Cm_RedisSession[0]->active = 'true';
253
+        $config->modules[0]->Cm_RedisSession[0]->active='true';
254 254
         file_put_contents($projectPath.$moduleFile, $config->asXML());
255 255
     }
256 256
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     protected function configureTestSuites(array $options, $projectPath, OutputInterface $output)
265 265
     {
266 266
         $output->writeln('<info>Configuring PHPSpec & Behat Suites</info>');
267
-        $progress = new ProgressBar($output, 2);
267
+        $progress=new ProgressBar($output, 2);
268 268
 
269 269
         $progress->start();
270 270
         copy($projectPath.'/puphpet/magestead/magento/stubs/phpspec.yml', $projectPath.'/phpspec.yml');
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
      */
289 289
     protected function getBehatConfig(array $options, $projectPath, OutputInterface $output)
290 290
     {
291
-        $yaml = new Parser();
291
+        $yaml=new Parser();
292 292
 
293 293
         try {
294
-            $behat = $yaml->parse(file_get_contents($projectPath.'/puphpet/magestead/magento/stubs/behat.yml'));
294
+            $behat=$yaml->parse(file_get_contents($projectPath.'/puphpet/magestead/magento/stubs/behat.yml'));
295 295
 
296
-            $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url'] = $options['base_url'];
296
+            $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url']=$options['base_url'];
297 297
 
298 298
             return $behat;
299 299
         } catch (ParseException $e) {
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
      */
312 312
     protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress)
313 313
     {
314
-        $dumper = new Dumper();
315
-        $yaml = $dumper->dump($behat, 6);
314
+        $dumper=new Dumper();
315
+        $yaml=$dumper->dump($behat, 6);
316 316
 
317 317
         try {
318 318
             file_put_contents($projectPath.'/behat.yml', $yaml);
Please login to merge, or discard this patch.
src/Magestead/Command/VM/SshCommand.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     protected function configure()
17 17
     {
18
-        $this->_projectPath = getcwd();
18
+        $this->_projectPath=getcwd();
19 19
 
20 20
         $this->setName("vm:up");
21 21
         $this->setDescription("Spin up your development machine");
Please login to merge, or discard this patch.
src/Magestead/Command/Index/SetModeCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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':
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function configure()
21 21
     {
22
-        $this->_projectPath = getcwd();
22
+        $this->_projectPath=getcwd();
23 23
         $this->setName('index:mode:set');
24 24
         $this->setDescription('Set index mode type');
25 25
         $this->addArgument('mode', InputArgument::REQUIRED, '{realtime|schedule} [indexer]');
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36
-        $indexMode = $input->getArgument('mode');
37
-        $command = $this->getCommand(new Config($output), $indexMode);
36
+        $indexMode=$input->getArgument('mode');
37
+        $command=$this->getCommand(new Config($output), $indexMode);
38 38
         if ($command) {
39 39
             $output->writeln('<info>Setting index mode</info>');
40
-            $pCommand = "vagrant ssh -c '".$command."'";
40
+            $pCommand="vagrant ssh -c '".$command."'";
41 41
 
42 42
             return new ProcessCommand($pCommand, $this->_projectPath, $output);
43 43
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function getCommand(Config $config, $mode)
55 55
     {
56
-        $type = $config->type;
56
+        $type=$config->type;
57 57
         switch ($type) {
58 58
             case 'magento2':
59 59
                 return "cd /var/www/public;bin/magento indexer:set-mode $mode";
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
58 58
                 break;
59 59
         }
60 60
 
61
-        return false;
61
+        return FALSE;
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Magestead/Command/Index/ReindexCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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':
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function configure()
21 21
     {
22
-        $this->_projectPath = getcwd();
22
+        $this->_projectPath=getcwd();
23 23
         $this->setName('index:reindex');
24 24
         $this->setDescription('Reindex data');
25 25
         $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]');
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36 36
         $output->writeln('<info>Reindexing data</info>');
37
-        $index = $input->getArgument('index');
37
+        $index=$input->getArgument('index');
38 38
 
39
-        $command = $this->getCommand(new Config($output), $index);
40
-        $pCommand = "vagrant ssh -c '".$command."'";
39
+        $command=$this->getCommand(new Config($output), $index);
40
+        $pCommand="vagrant ssh -c '".$command."'";
41 41
 
42 42
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
43 43
     }
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function getCommand(Config $config, $index)
52 52
     {
53
-        $type = $config->type;
53
+        $type=$config->type;
54 54
         switch ($type) {
55 55
             case 'magento':
56
-                $index = (!is_null($index)) ? ' '.$index : ':all';
56
+                $index=(!is_null($index)) ? ' '.$index : ':all';
57 57
 
58 58
                 return "cd /var/www/public;../bin/n98-magerun.phar index:reindex$index";
59 59
                 break;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
58 58
                 break;
59 59
         }
60 60
 
61
-        return false;
61
+        return FALSE;
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Magestead/Command/Redis/FlushallCommand.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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";
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     protected function configure()
19 19
     {
20
-        $this->_projectPath = getcwd();
20
+        $this->_projectPath=getcwd();
21 21
         $this->setName('redis:flush-all');
22 22
         $this->setDescription('Flush redis storage');
23 23
     }
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $output->writeln('<info>Flushing Redis Storage</info>');
34 34
 
35
-        $command = 'redis-cli flushall';
36
-        $pCommand = "vagrant ssh -c '".$command."'";
35
+        $command='redis-cli flushall';
36
+        $pCommand="vagrant ssh -c '".$command."'";
37 37
 
38 38
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
39 39
     }
Please login to merge, or discard this patch.
src/Magestead/Command/ProcessCommand.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
      * @param $projectPath
17 17
      * @param OutputInterface $output
18 18
      */
19
-    public function __construct($command, $projectPath, OutputInterface $output)
20
-    {
19
+    public function __construct($command, $projectPath, OutputInterface $output) {
21 20
         $this->run($command, $projectPath, $output);
22 21
     }
23 22
 
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
      * @param $projectPath
27 26
      * @param OutputInterface $output
28 27
      */
29
-    protected function run($command, $projectPath, OutputInterface $output)
30
-    {
28
+    protected function run($command, $projectPath, OutputInterface $output) {
31 29
         $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null);
32 30
 
33 31
         $process->run(function ($type, $line) use ($output) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     protected function run($command, $projectPath, OutputInterface $output)
30 30
     {
31
-        $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null);
31
+        $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), NULL, NULL);
32 32
 
33 33
         $process->run(function ($type, $line) use ($output) {
34 34
             $output->write($line);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
      */
29 29
     protected function run($command, $projectPath, OutputInterface $output)
30 30
     {
31
-        $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null);
31
+        $process=new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null);
32 32
 
33
-        $process->run(function ($type, $line) use ($output) {
33
+        $process->run(function($type, $line) use ($output) {
34 34
             $output->write($line);
35 35
         });
36 36
     }
Please login to merge, or discard this patch.
src/Magestead/Command/BehatCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 {
15 15
     protected $_projectPath;
16 16
 
17
-    protected function configure()
18
-    {
17
+    protected function configure() {
19 18
         $this->_projectPath = getcwd();
20 19
 
21 20
         $this->setName("behat");
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
      * @param OutputInterface $output
29 28
      * @return mixed
30 29
      */
31
-    protected function execute(InputInterface $input, OutputInterface $output)
32
-    {
30
+    protected function execute(InputInterface $input, OutputInterface $output) {
33 31
         $option = $input->getArgument('option');
34 32
         $command = $this->getCommand(new Config($output), $option);
35 33
         if (!$command) {
@@ -46,8 +44,7 @@  discard block
 block discarded – undo
46 44
      * @param $option
47 45
      * @return bool|string
48 46
      */
49
-    protected function getCommand(Config $config, $option)
50
-    {
47
+    protected function getCommand(Config $config, $option) {
51 48
         $type = $config->type;
52 49
         switch ($type) {
53 50
             case 'magento':
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
58 58
                 break;
59 59
         }
60 60
 
61
-        return false;
61
+        return FALSE;
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     protected function configure()
19 19
     {
20
-        $this->_projectPath = getcwd();
20
+        $this->_projectPath=getcwd();
21 21
 
22 22
         $this->setName('behat');
23 23
         $this->setDescription('Run Behat against your project');
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function execute(InputInterface $input, OutputInterface $output)
34 34
     {
35
-        $option = $input->getArgument('option');
36
-        $command = $this->getCommand(new Config($output), $option);
35
+        $option=$input->getArgument('option');
36
+        $command=$this->getCommand(new Config($output), $option);
37 37
         if (!$command) {
38 38
             return $output->writeln('<error>Command not available for this application</error>');
39 39
         }
40 40
 
41 41
         $output->writeln('<info>Running Behat</info>');
42
-        $passedCommand = "vagrant ssh -c '".$command."'";
42
+        $passedCommand="vagrant ssh -c '".$command."'";
43 43
         passthru($passedCommand);
44 44
     }
45 45
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     protected function getCommand(Config $config, $option)
53 53
     {
54
-        $type = $config->type;
54
+        $type=$config->type;
55 55
         switch ($type) {
56 56
             case 'magento':
57 57
                 return "cd /var/www;bin/behat $option";
Please login to merge, or discard this patch.