Completed
Pull Request — develop (#47)
by Steven
05:50 queued 02:48
created
src/Magestead/Service/VersionControl.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function __construct($repoUrl, $projectPath, OutputInterface $output)
22 22
     {
23
-        $this->_repoUrl = $repoUrl;
24
-        $this->_projectPath = $projectPath;
25
-        $this->_output = $output;
23
+        $this->_repoUrl=$repoUrl;
24
+        $this->_projectPath=$projectPath;
25
+        $this->_output=$output;
26 26
 
27 27
         $this->execute($output);
28 28
     }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function init()
54 54
     {
55
-        $command = 'git init; git remote add origin '.$this->_repoUrl;
55
+        $command='git init; git remote add origin '.$this->_repoUrl;
56 56
         new ProcessCommand($command, $this->_projectPath, $this->_output);
57 57
 
58 58
         return $this;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function addFiles()
67 67
     {
68
-        $command = 'git add -A';
68
+        $command='git add -A';
69 69
         new ProcessCommand($command, $this->_projectPath, $this->_output);
70 70
 
71 71
         return $this;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function commitFiles()
80 80
     {
81
-        $command = "git commit -m 'Initial commit'";
81
+        $command="git commit -m 'Initial commit'";
82 82
         new ProcessCommand($command, $this->_projectPath, $this->_output);
83 83
 
84 84
         return $this;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function pushFiles()
93 93
     {
94
-        $command = 'git push -u origin master';
94
+        $command='git push -u origin master';
95 95
         new ProcessCommand($command, $this->_projectPath, $this->_output);
96 96
 
97 97
         return $this;
Please login to merge, or discard this patch.
src/Magestead/Service/Notification.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
      */
18 18
     public static function send($message)
19 19
     {
20
-        $notifier = NotifierFactory::create();
21
-        $basePath = dirname(__FILE__).'/../../../';
22
-        $notification =
20
+        $notifier=NotifierFactory::create();
21
+        $basePath=dirname(__FILE__).'/../../../';
22
+        $notification=
23 23
             (new Notify())
24 24
                 ->setTitle('Magestead')
25 25
                 ->setBody($message)
Please login to merge, or discard this patch.
src/Magestead/Service/UsageApi.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
     /**
11 11
      * @var string
12 12
      */
13
-    protected $_apiUrl = 'http://api.magestead.com/v1/usage';
13
+    protected $_apiUrl='http://api.magestead.com/v1/usage';
14 14
 //    protected $_apiUrl = "http://magestead-api.app/v1/usage";
15 15
 
16 16
     /**
17 17
      * @var array
18 18
      */
19
-    protected $_params = [];
19
+    protected $_params=[];
20 20
 
21 21
     /**
22 22
      * UsageApi constructor.
@@ -25,30 +25,30 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function __construct($data)
27 27
     {
28
-        $this->_params['os_type'] = urlencode($data['os']);
29
-        $this->_params['server_type'] = urlencode($data['server']);
30
-        $this->_params['php_version'] = urlencode($data['phpver']);
31
-        $this->_params['application_version'] = urlencode($data['app']);
32
-        $this->_params['vm_memory_limit'] = urlencode($data['memory_limit']);
33
-        $this->_params['vm_cpu_count'] = urlencode($data['cpus']);
34
-        $this->_params['ip_address'] = urlencode($data['ip_address']);
35
-        $this->_params['box'] = urlencode($data['box']);
36
-        $this->_params['locale'] = urlencode($data['locale']);
37
-        $this->_params['default_currency'] = urlencode($data['default_currency']);
28
+        $this->_params['os_type']=urlencode($data['os']);
29
+        $this->_params['server_type']=urlencode($data['server']);
30
+        $this->_params['php_version']=urlencode($data['phpver']);
31
+        $this->_params['application_version']=urlencode($data['app']);
32
+        $this->_params['vm_memory_limit']=urlencode($data['memory_limit']);
33
+        $this->_params['vm_cpu_count']=urlencode($data['cpus']);
34
+        $this->_params['ip_address']=urlencode($data['ip_address']);
35
+        $this->_params['box']=urlencode($data['box']);
36
+        $this->_params['locale']=urlencode($data['locale']);
37
+        $this->_params['default_currency']=urlencode($data['default_currency']);
38 38
     }
39 39
 
40 40
     public function send()
41 41
     {
42
-        $fields_string = $this->getFieldsString();
42
+        $fields_string=$this->getFieldsString();
43 43
 
44
-        $ch = curl_init();
44
+        $ch=curl_init();
45 45
 
46 46
         curl_setopt($ch, CURLOPT_URL, $this->_apiUrl);
47 47
         curl_setopt($ch, CURLOPT_POST, count($this->_params));
48 48
         curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
49 49
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
50 50
 
51
-        $result = curl_exec($ch);
51
+        $result=curl_exec($ch);
52 52
 
53 53
         curl_close($ch);
54 54
     }
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
      */
59 59
     protected function getFieldsString()
60 60
     {
61
-        $fields_string = '';
61
+        $fields_string='';
62 62
         foreach ($this->_params as $key => $value) {
63
-            $fields_string .= $key.'='.$value.'&';
63
+            $fields_string.=$key.'='.$value.'&';
64 64
         }
65 65
         rtrim($fields_string, '&');
66 66
 
Please login to merge, or discard this patch.
src/Magestead/Command/Redis/FlushallCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     protected function configure()
19 19
     {
20
-        $this->_projectPath = getcwd();
20
+        $this->_projectPath=getcwd();
21 21
         $this->setName('redis:flush-all');
22 22
         $this->setDescription('Flush redis storage');
23 23
     }
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $output->writeln('<info>Flushing Redis Storage</info>');
34 34
 
35
-        $command = 'redis-cli flushall';
36
-        $pCommand = "vagrant ssh -c '".$command."'";
35
+        $command='redis-cli flushall';
36
+        $pCommand="vagrant ssh -c '".$command."'";
37 37
 
38 38
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
39 39
     }
Please login to merge, or discard this patch.
src/Magestead/Command/VM/RunCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     protected function configure()
19 19
     {
20
-        $this->_projectPath = getcwd();
20
+        $this->_projectPath=getcwd();
21 21
 
22 22
         $this->setName('vm:run');
23 23
         $this->setDescription('Run commands on your development machine via SSH');
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function execute(InputInterface $input, OutputInterface $output)
34 34
     {
35
-        $command = $input->getArgument('ssh-command');
35
+        $command=$input->getArgument('ssh-command');
36 36
         $output->writeln('<info>Running "'.$command.'" on Magestead</info>');
37 37
 
38
-        $passedCommand = "vagrant ssh -c '".$command."'";
38
+        $passedCommand="vagrant ssh -c '".$command."'";
39 39
 
40 40
         return new ProcessCommand($passedCommand, $this->_projectPath, $output);
41 41
     }
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
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function configure()
21 21
     {
22
-        $this->_projectPath = getcwd();
22
+        $this->_projectPath=getcwd();
23 23
         $this->setName('index:mode:set');
24 24
         $this->setDescription('Set index mode type');
25 25
         $this->addArgument('mode', InputArgument::REQUIRED, '{realtime|schedule} [indexer]');
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36
-        $indexMode = $input->getArgument('mode');
37
-        $command = $this->getCommand(new Config($output), $indexMode);
36
+        $indexMode=$input->getArgument('mode');
37
+        $command=$this->getCommand(new Config($output), $indexMode);
38 38
         if ($command) {
39 39
             $output->writeln('<info>Setting index mode</info>');
40
-            $pCommand = "vagrant ssh -c '".$command."'";
40
+            $pCommand="vagrant ssh -c '".$command."'";
41 41
 
42 42
             return new ProcessCommand($pCommand, $this->_projectPath, $output);
43 43
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function getCommand(Config $config, $mode)
55 55
     {
56
-        $type = $config->type;
56
+        $type=$config->type;
57 57
         switch ($type) {
58 58
             case 'magento2':
59 59
                 return "cd /var/www/public;bin/magento indexer:set-mode $mode";
Please login to merge, or discard this patch.
src/Magestead/Command/Index/ReindexCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function configure()
21 21
     {
22
-        $this->_projectPath = getcwd();
22
+        $this->_projectPath=getcwd();
23 23
         $this->setName('index:reindex');
24 24
         $this->setDescription('Reindex data');
25 25
         $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]');
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36 36
         $output->writeln('<info>Reindexing data</info>');
37
-        $index = $input->getArgument('index');
37
+        $index=$input->getArgument('index');
38 38
 
39
-        $command = $this->getCommand(new Config($output), $index);
40
-        $pCommand = "vagrant ssh -c '".$command."'";
39
+        $command=$this->getCommand(new Config($output), $index);
40
+        $pCommand="vagrant ssh -c '".$command."'";
41 41
 
42 42
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
43 43
     }
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function getCommand(Config $config, $index)
52 52
     {
53
-        $type = $config->type;
53
+        $type=$config->type;
54 54
         switch ($type) {
55 55
             case 'magento':
56
-                $index = (!is_null($index)) ? ' '.$index : ':all';
56
+                $index=(!is_null($index)) ? ' '.$index : ':all';
57 57
 
58 58
                 return "cd /var/www/public;../bin/n98-magerun.phar index:reindex$index";
59 59
                 break;
Please login to merge, or discard this patch.
src/Magestead/Command/Index/ShowModeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function configure()
21 21
     {
22
-        $this->_projectPath = getcwd();
22
+        $this->_projectPath=getcwd();
23 23
         $this->setName('index:mode:show');
24 24
         $this->setDescription('Show index mode');
25 25
         $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]');
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36
-        $index = $input->getArgument('index');
36
+        $index=$input->getArgument('index');
37 37
 
38
-        $command = $this->getCommand(new Config($output), $index);
38
+        $command=$this->getCommand(new Config($output), $index);
39 39
         if ($command) {
40 40
             $output->writeln('<info>Getting index mode</info>');
41
-            $passedCommand = "vagrant ssh -c '".$command."'";
41
+            $passedCommand="vagrant ssh -c '".$command."'";
42 42
 
43 43
             return new ProcessCommand($passedCommand, $this->_projectPath, $output);
44 44
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     protected function getCommand(Config $config, $index)
56 56
     {
57
-        $type = $config->type;
57
+        $type=$config->type;
58 58
         switch ($type) {
59 59
             case 'magento2':
60 60
                 return "cd /var/www/public;bin/magento indexer:show-mode $index";
Please login to merge, or discard this patch.
src/Magestead/Command/Cache/EnableCommand.php 1 patch
Spacing   +4 added lines, -4 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('cache:enable');
23 23
         $this->setDescription('Enable cache types');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Enabling all cache types</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:enable';
Please login to merge, or discard this patch.