@@ -20,9 +20,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -17,9 +17,9 @@ |
||
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) |
@@ -10,13 +10,13 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 | } |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 | } |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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 |
||
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"; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | protected function configure() |
20 | 20 | { |
21 | - $this->_projectPath = getcwd(); |
|
21 | + $this->_projectPath=getcwd(); |
|
22 | 22 | $this->setName('index:status'); |
23 | 23 | $this->setDescription('Show status of index'); |
24 | 24 | } |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | { |
34 | 34 | $output->writeln('<info>Getting index status</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 |
||
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 'magento2': |
52 | 52 | return 'cd /var/www/public;bin/magento indexer:status'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | protected function configure() |
20 | 20 | { |
21 | - $this->_projectPath = getcwd(); |
|
21 | + $this->_projectPath=getcwd(); |
|
22 | 22 | $this->setName('index:info'); |
23 | 23 | $this->setDescription('Show available indexes'); |
24 | 24 | } |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | { |
34 | 34 | $output->writeln('<info>Getting index information</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 |
||
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 index:list'; |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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 |
||
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; |