Completed
Pull Request — epic/2.0.0 (#37)
by Steven
05:34 queued 02:47
created
src/Magestead/Helper/HostsPluginChecker.php 1 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/Command/Index/ShowModeCommand.php 1 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:show");
23 23
         $this->setDescription("Show index mode");
24 24
         $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]');
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34
-        $index = $input->getArgument('index');
34
+        $index=$input->getArgument('index');
35 35
 
36
-        $command = $this->getCommand(new Config($output), $index);
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
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function getCommand(Config $config, $index)
52 52
     {
53
-        $type = $config->type;
53
+        $type=$config->type;
54 54
         switch ($type) {
55 55
             case 'magento2':
56 56
                 return "cd /var/www/public;bin/magento indexer:show-mode $index";
Please login to merge, or discard this patch.
provision/puphpet/magestead/magento2/add_redis_env.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$file = "$argv[1]/magento2/app/etc/env.php";
4
-$env  = include $file;
3
+$file="$argv[1]/magento2/app/etc/env.php";
4
+$env=include $file;
5 5
 
6
-$env['cache'] =  
7
-	array (
6
+$env['cache']=  
7
+	array(
8 8
 		'frontend' => 
9
-		array (
9
+		array(
10 10
 			'default' => 
11
-			array (
11
+			array(
12 12
 				'backend' => 'Cm_Cache_Backend_Redis',
13 13
     		'backend_options' => 
14
-    		array (
14
+    		array(
15 15
 					'server' => '127.0.0.1',
16 16
 					'port' => '6379',
17 17
 					'persistent' => '',
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
         )
28 28
 			),
29 29
 			'page_cache' => 
30
-			array (
30
+			array(
31 31
 	      'backend' => 'Cm_Cache_Backend_Redis',
32 32
 	      'backend_options' => 
33
-		    array (
33
+		    array(
34 34
 					'server' => '127.0.0.1',
35 35
 					'port' => '6379',
36 36
 					'persistent' => '',
@@ -48,4 +48,4 @@  discard block
 block discarded – undo
48 48
 		)
49 49
 	);
50 50
 
51
-file_put_contents($file, "<?php \n \n return ".var_export($env,true).";");
51
+file_put_contents($file, "<?php \n \n return ".var_export($env, true).";");
Please login to merge, or discard this patch.
provision/puphpet/magestead/magento2/set_repo_credentials.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$file = "/home/vagrant/.composer/auth.json";
3
+$file="/home/vagrant/.composer/auth.json";
4 4
 
5
-$publicKey  = "$argv[1]";
6
-$privateKey = "$argv[2]";
5
+$publicKey="$argv[1]";
6
+$privateKey="$argv[2]";
7 7
 
8
-$contents = [
8
+$contents=[
9 9
 	"http-basic" => [
10 10
 		"repo.magento.com" => [
11 11
 			"username" => $publicKey,
Please login to merge, or discard this patch.
src/Magestead/Service/Notification.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
      */
17 17
     public static function send($message)
18 18
     {
19
-        $notifier     = NotifierFactory::create();
20
-        $basePath     = dirname( __FILE__ ) . '/../../../';
21
-        $notification =
19
+        $notifier=NotifierFactory::create();
20
+        $basePath=dirname(__FILE__).'/../../../';
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/Service/VersionControl.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function __construct($repoUrl, $projectPath, OutputInterface $output)
19 19
     {
20
-        $this->_repoUrl     = $repoUrl;
21
-        $this->_projectPath = $projectPath;
22
-        $this->_output      = $output;
20
+        $this->_repoUrl=$repoUrl;
21
+        $this->_projectPath=$projectPath;
22
+        $this->_output=$output;
23 23
 
24 24
         $this->execute($output);
25 25
     }
@@ -49,7 +49,7 @@  discard block
 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;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function addFiles()
64 64
     {
65
-        $command = 'git add -A';
65
+        $command='git add -A';
66 66
         new ProcessCommand($command, $this->_projectPath, $this->_output);
67 67
 
68 68
         return $this;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function commitFiles()
77 77
     {
78
-        $command = "git commit -m 'Initial commit'";
78
+        $command="git commit -m 'Initial commit'";
79 79
         new ProcessCommand($command, $this->_projectPath, $this->_output);
80 80
 
81 81
         return $this;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function pushFiles()
90 90
     {
91
-        $command = "git push -u origin master";
91
+        $command="git push -u origin master";
92 92
         new ProcessCommand($command, $this->_projectPath, $this->_output);
93 93
 
94 94
         return $this;
Please login to merge, or discard this patch.
src/Magestead/Helper/Config.php 1 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/Command/Index/SetModeCommand.php 1 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 1 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.