Completed
Branch feature/folder-permissions (74f61c)
by Steven
02:29
created
src/Magestead/Service/VersionControl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function init()
51 51
     {
52
-        $command = 'git init; git remote add origin ' . $this->_repoUrl;
52
+        $command = 'git init; git remote add origin '.$this->_repoUrl;
53 53
         new ProcessCommand($command, $this->_projectPath, $this->_output);
54 54
 
55 55
         return $this;
Please login to merge, or discard this patch.
src/Magestead/Service/Notification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
     public static function send($message)
18 18
     {
19 19
         $notifier = NotifierFactory::create();
20
-        $basePath = dirname( __FILE__ ) . '/../../../';
20
+        $basePath = dirname(__FILE__).'/../../../';
21 21
         $notification =
22 22
             (new Notify())
23 23
                 ->setTitle('Magestead')
24 24
                 ->setBody($message)
25
-                ->setIcon($basePath .'assets/magentologo.png')
25
+                ->setIcon($basePath.'assets/magentologo.png')
26 26
         ;
27 27
 
28 28
         $notifier->send($notification);
Please login to merge, or discard this patch.
src/Magestead/Helper/HostsPluginChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 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 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@
 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 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function verifyAuth($helper, InputInterface $input, OutputInterface $output)
170 170
     {
171
-        $authFile = $_SERVER['HOME'] . "/.composer/auth.json";
171
+        $authFile = $_SERVER['HOME']."/.composer/auth.json";
172 172
 
173 173
         $authObj = [];
174 174
         if (file_exists($authFile)) {
175 175
             $authJson = file_get_contents($authFile);
176
-            $authObj = (array)json_decode($authJson);
176
+            $authObj = (array) json_decode($authJson);
177 177
 
178 178
             if (isset($authObj['http-basic']) && isset($authObj['http-basic']->{'repo.magento.com'})) {
179 179
                 return true;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     protected function setVagrantBox()
213 213
     {
214
-        $this->_box = self::BOX_PREFIX . $this->_os . "-$this->_server-php$this->_phpVer";
214
+        $this->_box = self::BOX_PREFIX.$this->_os."-$this->_server-php$this->_phpVer";
215 215
     }
216 216
 
217 217
     /**
Please login to merge, or discard this patch.
src/Magestead/Installers/Magento2Project.php 1 patch
Spacing   +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
     /**
@@ -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
     }
Please login to merge, or discard this patch.
src/Magestead/Installers/MagentoProject.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -55,20 +55,20 @@  discard block
 block discarded – undo
55 55
 
56 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]" \
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     protected function processVcs(array $options, $projectPath, OutputInterface $output)
190 190
     {
191 191
         if (!empty($options['repo_url'])) {
192
-            copy($projectPath . "/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath . "/.gitignore");
192
+            copy($projectPath."/puphpet/magestead/magento/stubs/gitignore.tmp", $projectPath."/.gitignore");
193 193
             return new VersionControl($options['repo_url'], $projectPath, $output);
194 194
         }
195 195
     }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     protected function composerInstall($projectPath, OutputInterface $output)
202 202
     {
203
-        copy($projectPath . "/puphpet/magestead/magento/stubs/composer.tmp", $projectPath . "/composer.json");
203
+        copy($projectPath."/puphpet/magestead/magento/stubs/composer.tmp", $projectPath."/composer.json");
204 204
         new ProcessCommand('composer install', $projectPath, $output);
205 205
     }
206 206
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     protected function updateConfigXml($projectPath)
220 220
     {
221 221
         $localFile = '/public/app/etc/local.xml';
222
-        $localXml = file_get_contents($projectPath . $localFile);
222
+        $localXml = file_get_contents($projectPath.$localFile);
223 223
 
224 224
         $config = new \SimpleXMLElement($localXml);
225 225
         $config->global[0]->redis_session[0]->host = '127.0.0.1';
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $config->global[0]->redis_session[0]->min_lifetime = '60';
242 242
         $config->global[0]->redis_session[0]->max_lifetime = '2592000';
243 243
 
244
-        file_put_contents($projectPath . $localFile, $config->asXML());
244
+        file_put_contents($projectPath.$localFile, $config->asXML());
245 245
     }
246 246
 
247 247
     /**
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
     protected function activateModule($projectPath)
251 251
     {
252 252
         $moduleFile = '/public/app/etc/modules/Cm_RedisSession.xml';
253
-        $moduleXml = file_get_contents($projectPath . $moduleFile);
253
+        $moduleXml = file_get_contents($projectPath.$moduleFile);
254 254
         $config = new \SimpleXMLElement($moduleXml);
255 255
         $config->modules[0]->Cm_RedisSession[0]->active = 'true';
256
-        file_put_contents($projectPath . $moduleFile, $config->asXML());
256
+        file_put_contents($projectPath.$moduleFile, $config->asXML());
257 257
     }
258 258
 
259 259
     /**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         $progress = new ProgressBar($output, 2);
269 269
 
270 270
         $progress->start();
271
-        copy($projectPath . "/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath . "/phpspec.yml");
271
+        copy($projectPath."/puphpet/magestead/magento/stubs/phpspec.yml", $projectPath."/phpspec.yml");
272 272
         $progress->advance();
273 273
         $progress->advance();
274 274
 //        $behat = $this->getBehatConfig($options, $projectPath, $output);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     {
290 290
         $yaml = new Parser();
291 291
         try {
292
-            $behat = $yaml->parse(file_get_contents($projectPath . "/puphpet/magestead/magento/stubs/behat.yml"));
292
+            $behat = $yaml->parse(file_get_contents($projectPath."/puphpet/magestead/magento/stubs/behat.yml"));
293 293
             $behat['default']['extensions']['MageTest\MagentoExtension\Extension']['base_url'] = $options['base_url'];
294 294
             return $behat;
295 295
         } catch (ParseException $e) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         $dumper = new Dumper();
311 311
         $yaml = $dumper->dump($behat, 6);
312 312
         try {
313
-            file_put_contents($projectPath . '/behat.yml', $yaml);
313
+            file_put_contents($projectPath.'/behat.yml', $yaml);
314 314
             $progress->advance();
315 315
         } catch (\Exception $e) {
316 316
             $output->writeln('<error>Unable to write to the YAML file</error>');
Please login to merge, or discard this patch.
src/Magestead/Command/SetupCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     protected function configure()
24 24
     {
25
-        $this->_basePath = dirname( __FILE__ ) . '/../../../';
25
+        $this->_basePath = dirname(__FILE__).'/../../../';
26 26
         $this->_projectPath = getcwd();
27 27
 
28 28
         $this->setName("setup");
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
                     \RecursiveIteratorIterator::SELF_FIRST) as $item
64 64
             ) {
65 65
                 if ($item->isDir()) {
66
-                    mkdir($target . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
66
+                    mkdir($target.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
67 67
                 } else {
68
-                    copy($item, $target . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
68
+                    copy($item, $target.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
69 69
                 }
70 70
                 $progress->advance();
71 71
             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $yaml = new Parser();
109 109
         try {
110
-            return $yaml->parse(file_get_contents($this->_projectPath . '/magestead.yaml'));
110
+            return $yaml->parse(file_get_contents($this->_projectPath.'/magestead.yaml'));
111 111
         } catch (ParseException $e) {
112 112
             $output->writeln('<error>Unable to parse the YAML string</error>');
113 113
             printf("Unable to parse the YAML string: %s", $e->getMessage());
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $yaml = $dumper->dump($config, 6);
125 125
 
126 126
         try {
127
-            file_put_contents($this->_projectPath . '/magestead.yaml', $yaml);
127
+            file_put_contents($this->_projectPath.'/magestead.yaml', $yaml);
128 128
         } catch (\Exception $e) {
129 129
             $output->writeln('<error>Unable to write to the YAML file</error>');
130 130
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     protected function setupProject(OutputInterface $output, $options)
138 138
     {
139 139
         $output->writeln('<info>Setting up project structure</info>');
140
-        $provisionFolder = $this->_basePath . "provision";
140
+        $provisionFolder = $this->_basePath."provision";
141 141
         $this->copyConfigFiles($provisionFolder, $this->_projectPath, $output);
142 142
         $this->configureProject($options->getAllOptions(), $output);
143 143
     }
Please login to merge, or discard this patch.
src/Magestead/Command/Index/ShowModeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $command = $this->getCommand(new Config($output), $index);
37 37
         if ($command) {
38 38
             $output->writeln('<info>Getting index mode</info>');
39
-            $passedCommand = "vagrant ssh -c '". $command ."'";
39
+            $passedCommand = "vagrant ssh -c '".$command."'";
40 40
             return new ProcessCommand($passedCommand, $this->_projectPath, $output);
41 41
         }
42 42
 
Please login to merge, or discard this patch.