@@ -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:mode:show"); |
| 23 | 23 | $this->setDescription("Show index mode"); |
| 24 | 24 | $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]'); |
@@ -31,12 +31,12 @@ discard block |
||
| 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 |
||
| 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"; |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | protected function run($command, $projectPath, OutputInterface $output) |
| 30 | 30 | { |
| 31 | - $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
|
| 31 | + $process=new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
|
| 32 | 32 | |
| 33 | - $process->run(function ($type, $line) use ($output) { |
|
| 33 | + $process->run(function($type, $line) use ($output) { |
|
| 34 | 34 | $output->write($line); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -1,17 +1,17 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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).";"); |
|
@@ -1,11 +1,11 @@ |
||
| 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, |
@@ -16,13 +16,13 @@ |
||
| 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); |
@@ -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("index:info"); |
| 22 | 22 | $this->setDescription("Show available indexes"); |
| 23 | 23 | } |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $output->writeln('<info>Getting index information</info>'); |
| 33 | 33 | |
| 34 | - $command = $this->getCommand(new Config($output)); |
|
| 35 | - $pCommand = "vagrant ssh -c '". $command ."'"; |
|
| 34 | + $command=$this->getCommand(new Config($output)); |
|
| 35 | + $pCommand="vagrant ssh -c '".$command."'"; |
|
| 36 | 36 | return new ProcessCommand($pCommand, $this->_projectPath, $output); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function getCommand(Config $config) |
| 44 | 44 | { |
| 45 | - $type = $config->type; |
|
| 45 | + $type=$config->type; |
|
| 46 | 46 | switch ($type) { |
| 47 | 47 | case 'magento': |
| 48 | 48 | return "cd /var/www/public;../bin/n98-magerun.phar index:list"; |
@@ -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: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 |
||
| 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 |
||
| 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"; |
@@ -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("index:status"); |
| 22 | 22 | $this->setDescription("Show status of index"); |
| 23 | 23 | } |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $output->writeln('<info>Getting index status</info>'); |
| 33 | 33 | |
| 34 | - $command = $this->getCommand(new Config($output)); |
|
| 35 | - $pCommand = "vagrant ssh -c '". $command ."'"; |
|
| 34 | + $command=$this->getCommand(new Config($output)); |
|
| 35 | + $pCommand="vagrant ssh -c '".$command."'"; |
|
| 36 | 36 | return new ProcessCommand($pCommand, $this->_projectPath, $output); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function getCommand(Config $config) |
| 44 | 44 | { |
| 45 | - $type = $config->type; |
|
| 45 | + $type=$config->type; |
|
| 46 | 46 | switch ($type) { |
| 47 | 47 | case 'magento2': |
| 48 | 48 | return "cd /var/www/public;bin/magento indexer:status"; |
@@ -16,7 +16,7 @@ discard block |
||
| 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 |
||
| 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 | } |