Completed
Push — master ( e48266...c6a956 )
by Steven
8s
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public static function verify(array $options, OutputInterface $output)
16 16
     {
17
-        $hostPlugin = `vagrant plugin list | grep vagrant-hostsupdater`;
17
+        $hostPlugin=`vagrant plugin list | grep vagrant-hostsupdater`;
18 18
         if (is_null($hostPlugin)) {
19 19
             self::editHostsInstructions($options, $output);
20 20
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     protected static function editHostsInstructions(array $options, OutputInterface $output)
30 30
     {
31 31
         $output->writeln('<comment>NOTE: You will need to add the following to your hosts file!</comment>');
32
-        $comment = $options['vagrantfile']['vm']['network']['private_network'] .
33
-            ' ' . $options['magestead']['apps']['mba_12345']['base_url'];
34
-        $output->writeln('<info>' . $comment . '</info>');
32
+        $comment=$options['vagrantfile']['vm']['network']['private_network'].
33
+            ' '.$options['magestead']['apps']['mba_12345']['base_url'];
34
+        $output->writeln('<info>'.$comment.'</info>');
35 35
     }
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
src/Magestead/Helper/Config.php 3 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
      * Config constructor.
14 14
      * @param OutputInterface $output
15 15
      */
16
-    public function __construct(OutputInterface $output)
17
-    {
16
+    public function __construct(OutputInterface $output) {
18 17
         $this->_projectPath = getcwd();
19 18
         $this->_config = $this->getConfigFile($output);
20 19
     }
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      * @param $name
24 23
      * @return mixed
25 24
      */
26
-    function __get($name)
27
-    {
25
+    function __get($name) {
28 26
         return $this->_config['magestead']['apps']['mba_12345'][$name];
29 27
     }
30 28
 
@@ -32,8 +30,7 @@  discard block
 block discarded – undo
32 30
      * @param OutputInterface $output
33 31
      * @return bool|mixed
34 32
      */
35
-    protected function getConfigFile(OutputInterface $output)
36
-    {
33
+    protected function getConfigFile(OutputInterface $output) {
37 34
         $config = new Parser();
38 35
         try {
39 36
             return $config->parse($this->readConfigFile());
@@ -48,8 +45,7 @@  discard block
 block discarded – undo
48 45
      * @return string
49 46
      * @throws MissingConfigFileException
50 47
      */
51
-    protected function readConfigFile()
52
-    {
48
+    protected function readConfigFile() {
53 49
         if (!file_exists($this->_projectPath . '/magestead.yaml')) {
54 50
             throw new MissingConfigFileException('No config file was found, are you in the project root?');
55 51
         }
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
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function __construct(OutputInterface $output)
17 17
     {
18
-        $this->_projectPath = getcwd();
19
-        $this->_config      = $this->getConfigFile($output);
18
+        $this->_projectPath=getcwd();
19
+        $this->_config=$this->getConfigFile($output);
20 20
     }
21 21
 
22 22
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     protected function getConfigFile(OutputInterface $output)
36 36
     {
37
-        $config = new Parser();
37
+        $config=new Parser();
38 38
         try {
39 39
             return $config->parse($this->readConfigFile());
40 40
         } catch (ParseException $e) {
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function readConfigFile()
52 52
     {
53
-        if (!file_exists($this->_projectPath . '/magestead.yaml')) {
53
+        if (!file_exists($this->_projectPath.'/magestead.yaml')) {
54 54
             throw new MissingConfigFileException('No config file was found, are you in the project root?');
55 55
         }
56 56
 
57
-        return file_get_contents($this->_projectPath . '/magestead.yaml');
57
+        return file_get_contents($this->_projectPath.'/magestead.yaml');
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
src/Magestead/Helper/Options.php 4 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@
 block discarded – undo
53 53
     public function getAllOptions()
54 54
     {
55 55
         return [
56
-          'app' => $this->_app,
57
-          'server' => $this->_server,
58
-          'phpver' => $this->_phpVer,
59
-          'os' => $this->_os,
60
-          'box' => $this->_box,
61
-          'm2user' => $this->_m2Username,
62
-          'm2pass' => $this->_m2Password,
63
-          'repo_url' => $this->_repoUrl,
64
-          'ip_address' => $this->_ipAddress,
65
-          'cpus' => $this->_cpus,
66
-          'memory_limit' => $this->_memorylimit,
67
-          'locale' => $this->_locale,
68
-          'default_currency' => $this->_currency,
69
-          'base_url' => $this->_baseUrl,
56
+            'app' => $this->_app,
57
+            'server' => $this->_server,
58
+            'phpver' => $this->_phpVer,
59
+            'os' => $this->_os,
60
+            'box' => $this->_box,
61
+            'm2user' => $this->_m2Username,
62
+            'm2pass' => $this->_m2Password,
63
+            'repo_url' => $this->_repoUrl,
64
+            'ip_address' => $this->_ipAddress,
65
+            'cpus' => $this->_cpus,
66
+            'memory_limit' => $this->_memorylimit,
67
+            'locale' => $this->_locale,
68
+            'default_currency' => $this->_currency,
69
+            'base_url' => $this->_baseUrl,
70 70
         ];
71 71
     }
72 72
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             return $this->verifyAuth($helper, $input, $output);
129 129
         }
130 130
 
131
-        return true;
131
+        return TRUE;
132 132
     }
133 133
 
134 134
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output)
140 140
     {
141
-        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
141
+        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", FALSE);
142 142
         $versioning = $helper->ask($input, $output, $versionControl);
143 143
         if ($versioning) {
144 144
             $repoQuestion = new Question("Enter your full GitHub/BitBucket repo URL: ", '');
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $authObj = (array)json_decode($authJson);
177 177
 
178 178
             if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) {
179
-                return true;
179
+                return TRUE;
180 180
             }
181 181
         }
182 182
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param OutputInterface $output
37 37
      * @param $project
38 38
      */
39
-    public function __construct($helper, InputInterface $input, OutputInterface $output, $project)
40
-    {
39
+    public function __construct($helper, InputInterface $input, OutputInterface $output, $project) {
41 40
         $this->setVagrantSettings($helper, $input, $output);
42 41
 
43 42
         $this->setServerConfig($helper, $input, $output);
@@ -52,8 +51,7 @@  discard block
 block discarded – undo
52 51
     /**
53 52
      * @return array
54 53
      */
55
-    public function getAllOptions()
56
-    {
54
+    public function getAllOptions() {
57 55
         return [
58 56
           'app' => $this->_app,
59 57
           'server' => $this->_server,
@@ -77,8 +75,7 @@  discard block
 block discarded – undo
77 75
      * @param InputInterface $input
78 76
      * @param OutputInterface $output
79 77
      */
80
-    protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output)
81
-    {
78
+    protected function setVagrantSettings($helper, InputInterface $input, OutputInterface $output) {
82 79
         $output->writeln('<comment>Lets configure your project\'s VM</comment>');
83 80
 
84 81
         $ipQuestion       = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47');
@@ -97,8 +94,7 @@  discard block
 block discarded – undo
97 94
      * @param OutputInterface $output
98 95
      * @param $project
99 96
      */
100
-    protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project)
101
-    {
97
+    protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project) {
102 98
         $output->writeln('<comment>Lets configure your project\'s application</comment>');
103 99
         if ($this->_phpVer !== '70') {
104 100
             $appQuestion = new ChoiceQuestion(
@@ -126,8 +122,7 @@  discard block
 block discarded – undo
126 122
      * @param OutputInterface $output
127 123
      * @return boolean|integer
128 124
      */
129
-    protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output)
130
-    {
125
+    protected function setMagento2Settings($helper, InputInterface $input, OutputInterface $output) {
131 126
         if ($this->_app === 'magento2') {
132 127
             return $this->verifyAuth($helper, $input, $output);
133 128
         }
@@ -140,8 +135,7 @@  discard block
 block discarded – undo
140 135
      * @param InputInterface $input
141 136
      * @param OutputInterface $output
142 137
      */
143
-    protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output)
144
-    {
138
+    protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output) {
145 139
         $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
146 140
         $versioning     = $helper->ask($input, $output, $versionControl);
147 141
         if ($versioning) {
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
      * @param InputInterface $input
156 150
      * @param OutputInterface $output
157 151
      */
158
-    protected function askForAuth($helper, InputInterface $input, OutputInterface $output)
159
-    {
152
+    protected function askForAuth($helper, InputInterface $input, OutputInterface $output) {
160 153
         $username          = new Question("Please enter your Magento username (public key): ", '');
161 154
         $this->_m2Username = $helper->ask($input, $output, $username);
162 155
 
@@ -170,8 +163,7 @@  discard block
 block discarded – undo
170 163
      * @param OutputInterface $output
171 164
      * @return boolean|integer
172 165
      */
173
-    protected function verifyAuth($helper, InputInterface $input, OutputInterface $output)
174
-    {
166
+    protected function verifyAuth($helper, InputInterface $input, OutputInterface $output) {
175 167
         $authFile = $_SERVER['HOME'] . "/.composer/auth.json";
176 168
 
177 169
         $authObj = [];
@@ -198,8 +190,7 @@  discard block
 block discarded – undo
198 190
      * @param InputInterface $input
199 191
      * @param OutputInterface $output
200 192
      */
201
-    protected function setPhp($helper, InputInterface $input, OutputInterface $output)
202
-    {
193
+    protected function setPhp($helper, InputInterface $input, OutputInterface $output) {
203 194
         $output->writeln('<info>Keep in mind PHP7 is only available for Magento 2</info>');
204 195
         $phpVerQuestion = new ChoiceQuestion(
205 196
             "Which version of PHP should be installed?",
@@ -213,8 +204,7 @@  discard block
 block discarded – undo
213 204
     /**
214 205
      * Set box name from concat user options
215 206
      */
216
-    protected function setVagrantBox()
217
-    {
207
+    protected function setVagrantBox() {
218 208
         $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer";
219 209
     }
220 210
 
@@ -223,8 +213,7 @@  discard block
 block discarded – undo
223 213
      * @param InputInterface $input
224 214
      * @param OutputInterface $output
225 215
      */
226
-    protected function setServerConfig($helper, InputInterface $input, OutputInterface $output)
227
-    {
216
+    protected function setServerConfig($helper, InputInterface $input, OutputInterface $output) {
228 217
         $output->writeln('<comment>Lets configure your server</comment>');
229 218
         $this->setOperatingSystem($helper, $input, $output);
230 219
         $this->setWebServer($helper, $input, $output);
@@ -236,8 +225,7 @@  discard block
 block discarded – undo
236 225
      * @param InputInterface $input
237 226
      * @param OutputInterface $output
238 227
      */
239
-    protected function setWebServer($helper, InputInterface $input, OutputInterface $output)
240
-    {
228
+    protected function setWebServer($helper, InputInterface $input, OutputInterface $output) {
241 229
         $serverQuestion = new ChoiceQuestion(
242 230
             "Which webserver would you like?",
243 231
             ['NGINX', 'Apache'],
@@ -252,8 +240,7 @@  discard block
 block discarded – undo
252 240
      * @param InputInterface $input
253 241
      * @param OutputInterface $output
254 242
      */
255
-    protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output)
256
-    {
243
+    protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output) {
257 244
         $osQuestion = new ChoiceQuestion(
258 245
             "Which OS would you like to install?",
259 246
             ['CentOS 6.5', 'Ubuntu 14'],
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 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,7 +27,7 @@  discard block
 block discarded – undo
27 27
     protected $_locale;
28 28
     protected $_currency;
29 29
     protected $_baseUrl;
30
-    protected $_repoUrl = '';
30
+    protected $_repoUrl='';
31 31
 
32 32
     /**
33 33
      * Options constructor.
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $output->writeln('<comment>Lets configure your project\'s VM</comment>');
83 83
 
84
-        $ipQuestion       = new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47');
85
-        $this->_ipAddress = strtolower($helper->ask($input, $output, $ipQuestion));
84
+        $ipQuestion=new Question("Configure the IP for your VM (192.168.47.47): ", '192.168.47.47');
85
+        $this->_ipAddress=strtolower($helper->ask($input, $output, $ipQuestion));
86 86
 
87
-        $cpuQuestion = new Question("How many CPU's would you like to use? (1): ", '1');
88
-        $this->_cpus = strtolower($helper->ask($input, $output, $cpuQuestion));
87
+        $cpuQuestion=new Question("How many CPU's would you like to use? (1): ", '1');
88
+        $this->_cpus=strtolower($helper->ask($input, $output, $cpuQuestion));
89 89
 
90
-        $memoryQuestion     = new Question("Define the VM memory limit (2048): ", '2048');
91
-        $this->_memorylimit = strtolower($helper->ask($input, $output, $memoryQuestion));
90
+        $memoryQuestion=new Question("Define the VM memory limit (2048): ", '2048');
91
+        $this->_memorylimit=strtolower($helper->ask($input, $output, $memoryQuestion));
92 92
     }
93 93
 
94 94
     /**
@@ -100,22 +100,22 @@  discard block
 block discarded – undo
100 100
     protected function setApplicationSettings($helper, InputInterface $input, OutputInterface $output, $project)
101 101
     {
102 102
         $output->writeln('<comment>Lets configure your project\'s application</comment>');
103
-        $appQuestion = new ChoiceQuestion(
103
+        $appQuestion=new ChoiceQuestion(
104 104
             "Which application do you want to install?",
105 105
             ['Magento', 'Magento2'],
106 106
             0
107 107
         );
108 108
 
109
-        $this->_app = strtolower($helper->ask($input, $output, $appQuestion));
109
+        $this->_app=strtolower($helper->ask($input, $output, $appQuestion));
110 110
 
111
-        $baseUrlQuestion = new Question("Enter your application's base_url ($project.dev): ", $project.'.dev');
112
-        $this->_baseUrl  = strtolower($helper->ask($input, $output, $baseUrlQuestion));
111
+        $baseUrlQuestion=new Question("Enter your application's base_url ($project.dev): ", $project.'.dev');
112
+        $this->_baseUrl=strtolower($helper->ask($input, $output, $baseUrlQuestion));
113 113
 
114
-        $currenyQuestion = new Question("Enter your application's default currency (GBP): ", 'GBP');
115
-        $this->_currency = $helper->ask($input, $output, $currenyQuestion);
114
+        $currenyQuestion=new Question("Enter your application's default currency (GBP): ", 'GBP');
115
+        $this->_currency=$helper->ask($input, $output, $currenyQuestion);
116 116
 
117
-        $localeQuestion = new Question("Enter your application's default locale (en_GB): ", 'en_GB');
118
-        $this->_locale  = $helper->ask($input, $output, $localeQuestion);
117
+        $localeQuestion=new Question("Enter your application's default locale (en_GB): ", 'en_GB');
118
+        $this->_locale=$helper->ask($input, $output, $localeQuestion);
119 119
     }
120 120
 
121 121
     /**
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
      */
141 141
     protected function setVersionControlSettings($helper, InputInterface $input, OutputInterface $output)
142 142
     {
143
-        $versionControl = new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
144
-        $versioning     = $helper->ask($input, $output, $versionControl);
143
+        $versionControl=new ConfirmationQuestion("Would you like to add your project to GIT? (no/yes) ", false);
144
+        $versioning=$helper->ask($input, $output, $versionControl);
145 145
         if ($versioning) {
146
-            $repoQuestion   = new Question("Enter your full GitHub/BitBucket repo URL: ", '');
147
-            $this->_repoUrl = strtolower($helper->ask($input, $output, $repoQuestion));
146
+            $repoQuestion=new Question("Enter your full GitHub/BitBucket repo URL: ", '');
147
+            $this->_repoUrl=strtolower($helper->ask($input, $output, $repoQuestion));
148 148
         }
149 149
     }
150 150
 
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
      */
156 156
     protected function askForAuth($helper, InputInterface $input, OutputInterface $output)
157 157
     {
158
-        $username          = new Question("Please enter your Magento username (public key): ", '');
159
-        $this->_m2Username = $helper->ask($input, $output, $username);
158
+        $username=new Question("Please enter your Magento username (public key): ", '');
159
+        $this->_m2Username=$helper->ask($input, $output, $username);
160 160
 
161
-        $password          = new Question("Please enter your Magento password (private key): ", '');
162
-        $this->_m2Password = $helper->ask($input, $output, $password);
161
+        $password=new Question("Please enter your Magento password (private key): ", '');
162
+        $this->_m2Password=$helper->ask($input, $output, $password);
163 163
     }
164 164
 
165 165
     /**
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
      */
171 171
     protected function verifyAuth($helper, InputInterface $input, OutputInterface $output)
172 172
     {
173
-        $authFile = $_SERVER['HOME'] . "/.composer/auth.json";
173
+        $authFile=$_SERVER['HOME']."/.composer/auth.json";
174 174
 
175
-        $authObj = [];
175
+        $authObj=[];
176 176
         if (file_exists($authFile)) {
177
-            $authJson = file_get_contents($authFile);
178
-            $authObj  = (array)json_decode($authJson);
177
+            $authJson=file_get_contents($authFile);
178
+            $authObj=(array) json_decode($authJson);
179 179
 
180 180
             if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) {
181 181
                 return true;
@@ -184,10 +184,10 @@  discard block
 block discarded – undo
184 184
 
185 185
         $this->askForAuth($helper, $input, $output);
186 186
 
187
-        $authObj['http-basic']['repo.magento.com']['username'] = $this->_m2Username;
188
-        $authObj['http-basic']['repo.magento.com']['password'] = $this->_m2Password;
187
+        $authObj['http-basic']['repo.magento.com']['username']=$this->_m2Username;
188
+        $authObj['http-basic']['repo.magento.com']['password']=$this->_m2Password;
189 189
 
190
-        $authJson = json_encode($authObj);
190
+        $authJson=json_encode($authObj);
191 191
         return file_put_contents($authFile, $authJson);
192 192
     }
193 193
 
@@ -199,13 +199,13 @@  discard block
 block discarded – undo
199 199
     protected function setPhp($helper, InputInterface $input, OutputInterface $output)
200 200
     {
201 201
         $output->writeln('<info>Keep in mind PHP7 is only available for Magento 2</info>');
202
-        $phpVerQuestion = new ChoiceQuestion(
202
+        $phpVerQuestion=new ChoiceQuestion(
203 203
             "Which version of PHP should be installed?",
204 204
             ['56', '70'],
205 205
             0
206 206
         );
207 207
 
208
-        $this->_phpVer = $helper->ask($input, $output, $phpVerQuestion);
208
+        $this->_phpVer=$helper->ask($input, $output, $phpVerQuestion);
209 209
     }
210 210
 
211 211
     /**
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     protected function setVagrantBox()
215 215
     {
216
-        $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer";
216
+        $this->_box=self::BOX_PREFIX.$this->_os."-$this->_server-php$this->_phpVer";
217 217
     }
218 218
 
219 219
     /**
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
      */
237 237
     protected function setWebServer($helper, InputInterface $input, OutputInterface $output)
238 238
     {
239
-        $serverQuestion = new ChoiceQuestion(
239
+        $serverQuestion=new ChoiceQuestion(
240 240
             "Which webserver would you like?",
241 241
             ['NGINX', 'Apache'],
242 242
             0
243 243
         );
244 244
 
245
-        $this->_server = strtolower($helper->ask($input, $output, $serverQuestion));
245
+        $this->_server=strtolower($helper->ask($input, $output, $serverQuestion));
246 246
     }
247 247
 
248 248
     /**
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
      */
253 253
     protected function setOperatingSystem($helper, InputInterface $input, OutputInterface $output)
254 254
     {
255
-        $osQuestion = new ChoiceQuestion(
255
+        $osQuestion=new ChoiceQuestion(
256 256
             "Which OS would you like to install?",
257 257
             ['CentOS 6.5', 'Ubuntu 14'],
258 258
             0
259 259
         );
260 260
 
261
-        $this->_os = str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion))));
261
+        $this->_os=str_replace(' ', '', str_replace('.', '', strtolower($helper->ask($input, $output, $osQuestion))));
262 262
     }
263 263
 }
264 264
\ No newline at end of file
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.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             ],
176 176
         ];
177 177
 
178
-        file_put_contents($file, "<?php \n \n return ".var_export($env,true).";");
178
+        file_put_contents($file, "<?php \n \n return ".var_export($env,TRUE).";");
179 179
     }
180 180
 
181 181
     /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     protected function setComposerBinDir($projectPath)
236 236
     {
237 237
         $file = "$projectPath/public/composer.json";
238
-        $composer = json_decode(file_get_contents($file), true);
238
+        $composer = json_decode(file_get_contents($file), TRUE);
239 239
         $composer['config']['bin-dir'] = 'bin';
240 240
         file_put_contents($file, json_encode($composer));
241 241
     }
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     protected function composerInstall($projectPath, OutputInterface $output)
38 38
     {
39 39
         $output->writeln('<info>Installing Magento 2 with Composer</info>');
40
-        $command = 'composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
40
+        $command='composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public';
41 41
         new ProcessCommand($command, $projectPath, $output);
42 42
 
43 43
         $this->setComposerBinDir($projectPath);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     protected function addPhpSpecPackage($projectPath, OutputInterface $output)
53 53
     {
54 54
         $output->writeln('<comment>Installing PHPSpec</comment>');
55
-        $command = 'cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
55
+        $command='cd '.$projectPath.'/public; composer require phpspec/phpspec --dev;';
56 56
         new ProcessCommand($command, $projectPath, $output);
57 57
 
58 58
         $this->setPhpSpecPermissions($projectPath, $output);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     protected function addBehatPackage($projectPath, OutputInterface $output)
66 66
     {
67 67
         $output->writeln('<comment>Installing Behat</comment>');
68
-        $command = 'cd '.$projectPath.'/public; composer require behat/behat --dev;';
68
+        $command='cd '.$projectPath.'/public; composer require behat/behat --dev;';
69 69
         new ProcessCommand($command, $projectPath, $output);
70 70
 
71 71
         $this->setBehatPermissions($projectPath, $output);
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
         $this->setPermissions($projectPath, $output);
82 82
 
83 83
         $output->writeln('<info>Installing Magento 2 Software</info>');
84
-        $locale           = $options['magestead']['apps']['mba_12345']['locale'];
85
-        $db_name          = $options['magestead']['apps']['mba_12345']['db_name'];
86
-        $base_url         = $options['magestead']['apps']['mba_12345']['base_url'];
87
-        $default_currency = $options['magestead']['apps']['mba_12345']['default_currency'];
84
+        $locale=$options['magestead']['apps']['mba_12345']['locale'];
85
+        $db_name=$options['magestead']['apps']['mba_12345']['db_name'];
86
+        $base_url=$options['magestead']['apps']['mba_12345']['base_url'];
87
+        $default_currency=$options['magestead']['apps']['mba_12345']['default_currency'];
88 88
 
89
-        $install = 'vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
89
+        $install='vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \
90 90
 --db-host=localhost \
91 91
 --db-name='.$db_name.' \
92 92
 --db-user=magestead \
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
     protected function setPermissions($projectPath, OutputInterface $output)
114 114
     {
115 115
         $output->writeln('<info>Setting Permissions</info>');
116
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
116
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type d -exec chmod 700 {} \;\'';
117 117
         new ProcessCommand($command, $projectPath, $output);
118 118
         $output->writeln('<comment>Folder Permissions Set</comment>');
119 119
 
120
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
120
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find . -type f -exec chmod 600 {} \;\'';
121 121
         new ProcessCommand($command, $projectPath, $output);
122 122
         $output->writeln('<comment>File Permissions Set</comment>');
123 123
 
124
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
124
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod +x bin/magento; sudo chmod 755 bin/phpspec; sudo chmod 755 bin/behat;\'';
125 125
         new ProcessCommand($command, $projectPath, $output);
126 126
         $output->writeln('<comment>bin/magento Permissions Set</comment>');
127 127
     }
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
     protected function configureRedis($projectPath, OutputInterface $output)
134 134
     {
135 135
         $output->writeln('<comment>Configuring Redis Cache</comment>');
136
-        $file = "$projectPath/public/app/etc/env.php";
137
-        $env  = include $file;
136
+        $file="$projectPath/public/app/etc/env.php";
137
+        $env=include $file;
138 138
 
139
-        $env['cache'] = [
139
+        $env['cache']=[
140 140
             'frontend' => [
141 141
                 'default' => [
142 142
                     'backend' => 'Cm_Cache_Backend_Redis',
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             ],
176 176
         ];
177 177
 
178
-        file_put_contents($file, "<?php \n \n return ".var_export($env,true).";");
178
+        file_put_contents($file, "<?php \n \n return ".var_export($env, true).";");
179 179
     }
180 180
 
181 181
     /**
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
      */
186 186
     protected function finaliseSetup(array $options, $projectPath, OutputInterface $output)
187 187
     {
188
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
188
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento indexer:reindex; \'';
189 189
         $output->writeln('<comment>Reindexing Tables</comment>');
190 190
         new ProcessCommand($command, $projectPath, $output);
191 191
 
192
-        $command = 'vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
192
+        $command='vagrant ssh -c \'cd /var/www/public; bin/magento cache:flush;\'';
193 193
         $output->writeln('<comment>Flushing All Cache</comment>');
194 194
         new ProcessCommand($command, $projectPath, $output);
195 195
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     protected function showCredentials(array $options, OutputInterface $output)
205 205
     {
206 206
         $output->writeln('<info>SUCCESS: Magestead has finished installing Magento 2!</info>');
207
-        $table = new Table($output);
207
+        $table=new Table($output);
208 208
         $table
209 209
             ->setHeaders(['Username', 'Password', 'Base URL', 'Admin URI'])
210 210
             ->setRows([
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     protected function processVcs(array $options, $projectPath, OutputInterface $output)
225 225
     {
226 226
         if (!empty($options['repo_url'])) {
227
-            copy($projectPath . "/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath . "/.gitignore");
227
+            copy($projectPath."/puphpet/magestead/magento2/stubs/gitignore.tmp", $projectPath."/.gitignore");
228 228
             return new VersionControl($options['repo_url'], $projectPath, $output);
229 229
         }
230 230
     }
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
      */
235 235
     protected function setComposerBinDir($projectPath)
236 236
     {
237
-        $file     = "$projectPath/public/composer.json";
238
-        $composer = json_decode(file_get_contents($file), true);
237
+        $file="$projectPath/public/composer.json";
238
+        $composer=json_decode(file_get_contents($file), true);
239 239
 
240
-        $composer['config']['bin-dir'] = 'bin';
240
+        $composer['config']['bin-dir']='bin';
241 241
         file_put_contents($file, json_encode($composer));
242 242
     }
243 243
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     protected function setPhpSpecPermissions($projectPath, OutputInterface $output)
249 249
     {
250
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
250
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/phpspec; bin/phpspec run\'';
251 251
         new ProcessCommand($command, $projectPath, $output);
252 252
     }
253 253
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     protected function setBehatPermissions($projectPath, OutputInterface $output)
259 259
     {
260
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
260
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 755 bin/behat; bin/behat --init\'';
261 261
         new ProcessCommand($command, $projectPath, $output);
262 262
     }
263 263
 }
264 264
\ No newline at end of file
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   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -48,27 +48,27 @@  discard block
 block discarded – undo
48 48
      */
49 49
     protected function installMagento(array $options, $projectPath, OutputInterface $output)
50 50
     {
51
-        $locale           = $options['magestead']['apps']['mba_12345']['locale'];
52
-        $db_name          = $options['magestead']['apps']['mba_12345']['db_name'];
53
-        $base_url         = $options['magestead']['apps']['mba_12345']['base_url'];
54
-        $default_currency = $options['magestead']['apps']['mba_12345']['default_currency'];
51
+        $locale=$options['magestead']['apps']['mba_12345']['locale'];
52
+        $db_name=$options['magestead']['apps']['mba_12345']['db_name'];
53
+        $base_url=$options['magestead']['apps']['mba_12345']['base_url'];
54
+        $default_currency=$options['magestead']['apps']['mba_12345']['default_currency'];
55 55
 
56
-        $install = 'vagrant ssh -c \'cd /var/www/public; php -f install.php -- \
56
+        $install='vagrant ssh -c \'cd /var/www/public; php -f install.php -- \
57 57
 --license_agreement_accepted "yes" \
58
---locale "' . $locale . '" \
58
+--locale "' . $locale.'" \
59 59
 --timezone "Europe/London" \
60
---default_currency "' . $default_currency . '" \
60
+--default_currency "' . $default_currency.'" \
61 61
 --db_host "localhost" \
62
---db_name "' . $db_name . '" \
62
+--db_name "' . $db_name.'" \
63 63
 --db_user "magestead" \
64 64
 --db_pass "vagrant" \
65 65
 --session_save "db" \
66
---url "http://' . $base_url . '/" \
66
+--url "http://' . $base_url.'/" \
67 67
 --use_rewrites "yes" \
68 68
 --skip_url_validation "yes" \
69 69
 --use_secure "no" \
70 70
 --use_secure_admin "no" \
71
---secure_base_url "http://' . $base_url . '/" \
71
+--secure_base_url "http://' . $base_url.'/" \
72 72
 --admin_firstname "RichDynamix" \
73 73
 --admin_lastname "Magestead" \
74 74
 --admin_email "[email protected]" \
@@ -88,27 +88,27 @@  discard block
 block discarded – undo
88 88
      */
89 89
     protected function setPermissions($projectPath, OutputInterface $output)
90 90
     {
91
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\'';
91
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type f -exec chmod 600 {} \;\'';
92 92
         $output->writeln('<comment>Setting "var" Files Permissions</comment>');
93 93
         new ProcessCommand($command, $projectPath, $output);
94 94
 
95
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\'';
95
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type f -exec chmod 600 {} \;\'';
96 96
         $output->writeln('<comment>Setting "media" Files Permissions</comment>');
97 97
         new ProcessCommand($command, $projectPath, $output);
98 98
 
99
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\'';
99
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find var/ -type d -exec chmod 700 {} \;\'';
100 100
         $output->writeln('<comment>Setting "var" Folder Permissions</comment>');
101 101
         new ProcessCommand($command, $projectPath, $output);
102 102
 
103
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\'';
103
+        $command='vagrant ssh -c \'cd /var/www/public; sudo find media/ -type d -exec chmod 700 {} \;\'';
104 104
         $output->writeln('<comment>Setting "media" Folder Permissions</comment>');
105 105
         new ProcessCommand($command, $projectPath, $output);
106 106
 
107
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\'';
107
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 700 includes;\'';
108 108
         $output->writeln('<comment>Setting "includes" Permissions</comment>');
109 109
         new ProcessCommand($command, $projectPath, $output);
110 110
 
111
-        $command = 'vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\'';
111
+        $command='vagrant ssh -c \'cd /var/www/public; sudo chmod 600 includes/config.php;\'';
112 112
         $output->writeln('<comment>Setting "includes/config.php" Permissions</comment>');
113 113
         new ProcessCommand($command, $projectPath, $output);
114 114
     }
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected function installMagerun($projectPath, OutputInterface $output)
121 121
     {
122
-        $command = 'vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\'';
122
+        $command='vagrant ssh -c \'cd /var/www/bin; sudo wget https://files.magerun.net/n98-magerun.phar;\'';
123 123
         $output->writeln('<info>Downloading Magerun</info>');
124 124
         new ProcessCommand($command, $projectPath, $output);
125 125
 
126
-        $command = 'vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\'';
126
+        $command='vagrant ssh -c \'cd /var/www/bin; sudo chmod +x ./n98-magerun.phar;\'';
127 127
         $output->writeln('<comment>Setting Magerun Permissions</comment>');
128 128
         new ProcessCommand($command, $projectPath, $output);
129 129
     }
@@ -135,21 +135,21 @@  discard block
 block discarded – undo
135 135
      */
136 136
     protected function finaliseSetup(array $options, $projectPath, OutputInterface $output)
137 137
     {
138
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\'';
138
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar index:reindex:all;\'';
139 139
         $output->writeln('<comment>Reindexing Tables</comment>');
140 140
         new ProcessCommand($command, $projectPath, $output);
141 141
 
142
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\'';
142
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:enable;\'';
143 143
         $output->writeln('<comment>Enabling All Cache</comment>');
144 144
         new ProcessCommand($command, $projectPath, $output);
145 145
 
146
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\'';
146
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar cache:flush;\'';
147 147
         $output->writeln('<comment>Flushing All Cache</comment>');
148 148
         new ProcessCommand($command, $projectPath, $output);
149 149
 
150 150
         $this->processVcs($options, $projectPath, $output);
151 151
 
152
-        $command = 'vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\'';
152
+        $command='vagrant ssh -c \'cd /var/www/public; ../bin/n98-magerun.phar sys:check;\'';
153 153
         $output->writeln('<comment>System Check</comment>');
154 154
         new ProcessCommand($command, $projectPath, $output);
155 155
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     protected function showCredentials(array $options, OutputInterface $output)
162 162
     {
163 163
         $output->writeln('<info>SUCCESS: Magestead has finished installing Magento!</info>');
164
-        $table = new Table($output);
164
+        $table=new Table($output);
165 165
         $table
166 166
             ->setHeaders(['Username', 'Password', 'Base URL'])
167 167
             ->setRows([
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     protected function processVcs(array $options, $projectPath, OutputInterface $output)
182 182
     {
183 183
         if (!empty($options['repo_url'])) {
184
-            copy($projectPath . "/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath . "/.gitignore");
184
+            copy($projectPath."/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath."/.gitignore");
185 185
             return new VersionControl($options['repo_url'], $projectPath, $output);
186 186
         }
187 187
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     protected function composerInstall($projectPath, OutputInterface $output)
194 194
     {
195
-        copy($projectPath . "/puphpet/magestead/magento/stubs/composer.tmp", $projectPath . "/composer.json");
195
+        copy($projectPath."/puphpet/magestead/magento/stubs/composer.tmp", $projectPath."/composer.json");
196 196
         new ProcessCommand('composer install', $projectPath, $output);
197 197
     }
198 198
 
@@ -210,31 +210,31 @@  discard block
 block discarded – undo
210 210
      */
211 211
     protected function updateConfigXml($projectPath)
212 212
     {
213
-        $localFile = '/public/app/etc/local.xml';
214
-        $localXml  = file_get_contents($projectPath . $localFile);
215
-
216
-        $config = new \SimpleXMLElement($localXml);
217
-
218
-        $config->global[0]->redis_session[0]->host                  = '127.0.0.1';
219
-        $config->global[0]->redis_session[0]->port                  = '6379';
220
-        $config->global[0]->redis_session[0]->password              = '';
221
-        $config->global[0]->redis_session[0]->timeout               = '2.5';
222
-        $config->global[0]->redis_session[0]->persistent            = '';
223
-        $config->global[0]->redis_session[0]->db                    = '';
224
-        $config->global[0]->redis_session[0]->compression_threshold = '2048';
225
-        $config->global[0]->redis_session[0]->compression_lib       = 'gzip';
226
-        $config->global[0]->redis_session[0]->log_level             = '1';
227
-        $config->global[0]->redis_session[0]->max_concurrency       = '6';
228
-        $config->global[0]->redis_session[0]->break_after_frontend  = '5';
229
-        $config->global[0]->redis_session[0]->break_after_adminhtml = '30';
230
-        $config->global[0]->redis_session[0]->first_lifetime        = '600';
231
-        $config->global[0]->redis_session[0]->bot_first_lifetime    = '60';
232
-        $config->global[0]->redis_session[0]->bot_lifetime          = '7200';
233
-        $config->global[0]->redis_session[0]->disable_locking       = '0';
234
-        $config->global[0]->redis_session[0]->min_lifetime          = '60';
235
-        $config->global[0]->redis_session[0]->max_lifetime          = '2592000';
236
-
237
-        file_put_contents($projectPath . $localFile, $config->asXML());
213
+        $localFile='/public/app/etc/local.xml';
214
+        $localXml=file_get_contents($projectPath.$localFile);
215
+
216
+        $config=new \SimpleXMLElement($localXml);
217
+
218
+        $config->global[0]->redis_session[0]->host='127.0.0.1';
219
+        $config->global[0]->redis_session[0]->port='6379';
220
+        $config->global[0]->redis_session[0]->password='';
221
+        $config->global[0]->redis_session[0]->timeout='2.5';
222
+        $config->global[0]->redis_session[0]->persistent='';
223
+        $config->global[0]->redis_session[0]->db='';
224
+        $config->global[0]->redis_session[0]->compression_threshold='2048';
225
+        $config->global[0]->redis_session[0]->compression_lib='gzip';
226
+        $config->global[0]->redis_session[0]->log_level='1';
227
+        $config->global[0]->redis_session[0]->max_concurrency='6';
228
+        $config->global[0]->redis_session[0]->break_after_frontend='5';
229
+        $config->global[0]->redis_session[0]->break_after_adminhtml='30';
230
+        $config->global[0]->redis_session[0]->first_lifetime='600';
231
+        $config->global[0]->redis_session[0]->bot_first_lifetime='60';
232
+        $config->global[0]->redis_session[0]->bot_lifetime='7200';
233
+        $config->global[0]->redis_session[0]->disable_locking='0';
234
+        $config->global[0]->redis_session[0]->min_lifetime='60';
235
+        $config->global[0]->redis_session[0]->max_lifetime='2592000';
236
+
237
+        file_put_contents($projectPath.$localFile, $config->asXML());
238 238
     }
239 239
 
240 240
     /**
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
      */
243 243
     protected function activateModule($projectPath)
244 244
     {
245
-        $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml';
246
-        $moduleXml  = file_get_contents($projectPath . $moduleFile);
247
-        $config     = new \SimpleXMLElement($moduleXml);
245
+        $moduleFile='/public/app/etc/modules/Cm_RedisSession.xml';
246
+        $moduleXml=file_get_contents($projectPath.$moduleFile);
247
+        $config=new \SimpleXMLElement($moduleXml);
248 248
 
249
-        $config->modules[0]->Cm_RedisSession[0]->active = 'true';
250
-        file_put_contents($projectPath . $moduleFile, $config->asXML());
249
+        $config->modules[0]->Cm_RedisSession[0]->active='true';
250
+        file_put_contents($projectPath.$moduleFile, $config->asXML());
251 251
     }
252 252
 
253 253
     /**
@@ -259,10 +259,10 @@  discard block
 block discarded – undo
259 259
     protected function configureTestSuites(array $options, $projectPath, OutputInterface $output)
260 260
     {
261 261
         $output->writeln('<info>Configuring PHPSpec & Behat Suites</info>');
262
-        $progress = new ProgressBar($output, 2);
262
+        $progress=new ProgressBar($output, 2);
263 263
 
264 264
         $progress->start();
265
-        copy($projectPath . "/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath . "/phpspec.yml");
265
+        copy($projectPath."/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath."/phpspec.yml");
266 266
         $progress->advance();
267 267
         $progress->advance();
268 268
 //        $behat = $this->getBehatConfig($options, $projectPath, $output);
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
      */
282 282
     protected function getBehatConfig(array $options, $projectPath, OutputInterface $output)
283 283
     {
284
-        $yaml = new Parser();
284
+        $yaml=new Parser();
285 285
 
286 286
         try {
287
-            $behat = $yaml->parse(file_get_contents($projectPath . "/puphpet/magestead/magento/stubs/behat.yml"));
287
+            $behat=$yaml->parse(file_get_contents($projectPath."/puphpet/magestead/magento/stubs/behat.yml"));
288 288
 
289
-            $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url'] = $options['base_url'];
289
+            $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url']=$options['base_url'];
290 290
             return $behat;
291 291
         } catch (ParseException $e) {
292 292
             $output->writeln('<error>Unable to parse the YAML config</error>');
@@ -303,11 +303,11 @@  discard block
 block discarded – undo
303 303
      */
304 304
     protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress)
305 305
     {
306
-        $dumper = new Dumper();
307
-        $yaml   = $dumper->dump($behat, 6);
306
+        $dumper=new Dumper();
307
+        $yaml=$dumper->dump($behat, 6);
308 308
 
309 309
         try {
310
-            file_put_contents($projectPath . '/behat.yml', $yaml);
310
+            file_put_contents($projectPath.'/behat.yml', $yaml);
311 311
             $progress->advance();
312 312
         } catch (\Exception $e) {
313 313
             $output->writeln('<error>Unable to write to the YAML file</error>');
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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,6 +52,6 @@
 block discarded – undo
52 52
                 break;
53 53
         }
54 54
 
55
-        return false;
55
+        return FALSE;
56 56
     }
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName("index:mode:set");
23 23
         $this->setDescription("Set index mode type");
24 24
         $this->addArgument('mode', InputArgument::REQUIRED, '{realtime|schedule} [indexer]');
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34
-        $indexMode = $input->getArgument('mode');
35
-        $command   = $this->getCommand(new Config($output), $indexMode);
34
+        $indexMode=$input->getArgument('mode');
35
+        $command=$this->getCommand(new Config($output), $indexMode);
36 36
         if ($command) {
37 37
             $output->writeln('<info>Setting index mode</info>');
38
-            $pCommand = "vagrant ssh -c '". $command ."'";
38
+            $pCommand="vagrant ssh -c '".$command."'";
39 39
             return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
         }
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function getCommand(Config $config, $mode)
51 51
     {
52
-        $type = $config->type;
52
+        $type=$config->type;
53 53
         switch ($type) {
54 54
             case 'magento2':
55 55
                 return "cd /var/www/public;bin/magento indexer:set-mode $mode";
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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,6 +52,6 @@
 block discarded – undo
52 52
                 break;
53 53
         }
54 54
 
55
-        return false;
55
+        return FALSE;
56 56
     }
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName("index:reindex");
23 23
         $this->setDescription("Reindex data");
24 24
         $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]');
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34 34
         $output->writeln('<info>Reindexing data</info>');
35
-        $index = $input->getArgument('index');
35
+        $index=$input->getArgument('index');
36 36
 
37
-        $command  = $this->getCommand(new Config($output), $index);
38
-        $pCommand = "vagrant ssh -c '". $command ."'";
37
+        $command=$this->getCommand(new Config($output), $index);
38
+        $pCommand="vagrant ssh -c '".$command."'";
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
41 41
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config, $index)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52
-                $index = (!is_null($index)) ? ' '.$index : ':all';
52
+                $index=(!is_null($index)) ? ' '.$index : ':all';
53 53
                 return "cd /var/www/public;../bin/n98-magerun.phar index:reindex$index";
54 54
                 break;
55 55
             case 'magento2':
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
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     protected function configure()
18 18
     {
19
-        $this->_projectPath = getcwd();
19
+        $this->_projectPath=getcwd();
20 20
         $this->setName("redis:flush-all");
21 21
         $this->setDescription("Flush redis storage");
22 22
     }
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $output->writeln('<info>Flushing Redis Storage</info>');
32 32
 
33
-        $command  = "redis-cli flushall";
34
-        $pCommand = "vagrant ssh -c '". $command ."'";
33
+        $command="redis-cli flushall";
34
+        $pCommand="vagrant ssh -c '".$command."'";
35 35
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.