@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | protected $_projectPath; |
| 14 | 14 | |
| 15 | - protected function configure() |
|
| 16 | - { |
|
| 15 | + protected function configure() { |
|
| 17 | 16 | $this->_projectPath = getcwd(); |
| 18 | 17 | |
| 19 | 18 | $this->setName("vm:ssh"); |
@@ -25,8 +24,7 @@ discard block |
||
| 25 | 24 | * @param OutputInterface $output |
| 26 | 25 | * @return bool |
| 27 | 26 | */ |
| 28 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 29 | - { |
|
| 27 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 30 | 28 | passthru('vagrant ssh'); |
| 31 | 29 | return true; |
| 32 | 30 | } |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | protected function execute(InputInterface $input, OutputInterface $output) |
| 29 | 29 | { |
| 30 | 30 | passthru('vagrant ssh'); |
| 31 | - return true; |
|
| 31 | + return TRUE; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | protected function configure() |
| 16 | 16 | { |
| 17 | - $this->_projectPath = getcwd(); |
|
| 17 | + $this->_projectPath=getcwd(); |
|
| 18 | 18 | |
| 19 | 19 | $this->setName("vm:ssh"); |
| 20 | 20 | $this->setDescription("Login to your development machine with SSH"); |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | protected $_projectPath; |
| 16 | 16 | |
| 17 | - protected function configure() |
|
| 18 | - { |
|
| 17 | + protected function configure() { |
|
| 19 | 18 | $this->_projectPath = getcwd(); |
| 20 | 19 | |
| 21 | 20 | $this->setName("vm:run"); |
@@ -28,8 +27,7 @@ discard block |
||
| 28 | 27 | * @param OutputInterface $output |
| 29 | 28 | * @return ProcessCommand |
| 30 | 29 | */ |
| 31 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 32 | - { |
|
| 30 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 33 | 31 | $command = $input->getArgument('ssh-command'); |
| 34 | 32 | $output->writeln('<info>Running "'.$command.'" on Magestead</info>'); |
| 35 | 33 | |
@@ -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 | |
| 21 | 21 | $this->setName("vm:run"); |
| 22 | 22 | $this->setDescription("Run commands on your development machine via SSH"); |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | protected function execute(InputInterface $input, OutputInterface $output) |
| 32 | 32 | { |
| 33 | - $command = $input->getArgument('ssh-command'); |
|
| 33 | + $command=$input->getArgument('ssh-command'); |
|
| 34 | 34 | $output->writeln('<info>Running "'.$command.'" on Magestead</info>'); |
| 35 | 35 | |
| 36 | - $passedCommand = "vagrant ssh -c '". $command ."'"; |
|
| 36 | + $passedCommand="vagrant ssh -c '".$command."'"; |
|
| 37 | 37 | return new ProcessCommand($passedCommand, $this->_projectPath, $output); |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | protected $_config; |
| 17 | 17 | protected $_projectPath; |
| 18 | 18 | |
| 19 | - protected function configure() |
|
| 20 | - { |
|
| 19 | + protected function configure() { |
|
| 21 | 20 | $this->_projectPath = getcwd(); |
| 22 | 21 | $this->setName("index:reindex"); |
| 23 | 22 | $this->setDescription("Reindex data"); |
@@ -29,8 +28,7 @@ discard block |
||
| 29 | 28 | * @param OutputInterface $output |
| 30 | 29 | * @return ProcessCommand |
| 31 | 30 | */ |
| 32 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 33 | - { |
|
| 31 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 34 | 32 | $output->writeln('<info>Reindexing data</info>'); |
| 35 | 33 | $index = $input->getArgument('index'); |
| 36 | 34 | |
@@ -44,8 +42,7 @@ discard block |
||
| 44 | 42 | * @param $index |
| 45 | 43 | * @return bool|string |
| 46 | 44 | */ |
| 47 | - protected function getCommand(Config $config, $index) |
|
| 48 | - { |
|
| 45 | + protected function getCommand(Config $config, $index) { |
|
| 49 | 46 | $type = $config->type; |
| 50 | 47 | switch ($type) { |
| 51 | 48 | case 'magento': |
@@ -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:reindex"); |
| 23 | 23 | $this->setDescription("Reindex data"); |
| 24 | 24 | $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]'); |
@@ -32,10 +32,10 @@ discard block |
||
| 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 |
||
| 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 | case 'magento2': |
| 55 | 55 | return "cd /var/www/public;bin/magento indexer:reindex $index"; |
@@ -55,6 +55,6 @@ |
||
| 55 | 55 | return "cd /var/www/public;bin/magento indexer:reindex $index"; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - return false; |
|
| 58 | + return FALSE; |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | \ No newline at end of file |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | * @param $projectPath |
| 17 | 17 | * @param OutputInterface $output |
| 18 | 18 | */ |
| 19 | - public function __construct($command, $projectPath, OutputInterface $output) |
|
| 20 | - { |
|
| 19 | + public function __construct($command, $projectPath, OutputInterface $output) { |
|
| 21 | 20 | $this->run($command, $projectPath, $output); |
| 22 | 21 | } |
| 23 | 22 | |
@@ -26,8 +25,7 @@ discard block |
||
| 26 | 25 | * @param $projectPath |
| 27 | 26 | * @param OutputInterface $output |
| 28 | 27 | */ |
| 29 | - protected function run($command, $projectPath, OutputInterface $output) |
|
| 30 | - { |
|
| 28 | + protected function run($command, $projectPath, OutputInterface $output) { |
|
| 31 | 29 | $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
| 32 | 30 | |
| 33 | 31 | $process->run(function ($type, $line) use ($output) { |
@@ -28,7 +28,7 @@ |
||
| 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 | 33 | $process->run(function ($type, $line) use ($output) { |
| 34 | 34 | $output->write($line); |
@@ -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 | } |
@@ -4,4 +4,6 @@ |
||
| 4 | 4 | * Class MissingConfigFileException |
| 5 | 5 | * @package Magestead\Exceptions |
| 6 | 6 | */ |
| 7 | -class MissingConfigFileException extends \Exception {} |
|
| 8 | 7 | \ No newline at end of file |
| 8 | +class MissingConfigFileException extends \Exception |
|
| 9 | +{ |
|
| 10 | +} |
|
| 9 | 11 | \ No newline at end of file |
@@ -6,12 +6,12 @@ |
||
| 6 | 6 | $privateKey = "$argv[2]"; |
| 7 | 7 | |
| 8 | 8 | $contents = [ |
| 9 | - "http-basic" => [ |
|
| 10 | - "repo.magento.com" => [ |
|
| 11 | - "username" => $publicKey, |
|
| 12 | - "password" => $privateKey, |
|
| 13 | - ] |
|
| 14 | - ] |
|
| 9 | + "http-basic" => [ |
|
| 10 | + "repo.magento.com" => [ |
|
| 11 | + "username" => $publicKey, |
|
| 12 | + "password" => $privateKey, |
|
| 13 | + ] |
|
| 14 | + ] |
|
| 15 | 15 | ]; |
| 16 | 16 | |
| 17 | 17 | |
@@ -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, |
@@ -48,4 +48,4 @@ |
||
| 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,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).";"); |
|
@@ -4,48 +4,48 @@ |
||
| 4 | 4 | $env = include $file; |
| 5 | 5 | |
| 6 | 6 | $env['cache'] = |
| 7 | - array ( |
|
| 8 | - 'frontend' => |
|
| 9 | - array ( |
|
| 10 | - 'default' => |
|
| 11 | - array ( |
|
| 12 | - 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 13 | - 'backend_options' => |
|
| 14 | - array ( |
|
| 15 | - 'server' => '127.0.0.1', |
|
| 16 | - 'port' => '6379', |
|
| 17 | - 'persistent' => '', |
|
| 18 | - 'database' => '0', |
|
| 19 | - 'force_standalone' => '0', |
|
| 20 | - 'connect_retries' => '1', |
|
| 21 | - 'read_timeout' => '10', |
|
| 22 | - 'automatic_cleaning_factor' => '0', |
|
| 23 | - 'compress_data' => '1', |
|
| 24 | - 'compress_tags' => '1', |
|
| 25 | - 'compress_threshold' => '20480', |
|
| 26 | - 'compression_lib' => 'gzip', |
|
| 7 | + array ( |
|
| 8 | + 'frontend' => |
|
| 9 | + array ( |
|
| 10 | + 'default' => |
|
| 11 | + array ( |
|
| 12 | + 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 13 | + 'backend_options' => |
|
| 14 | + array ( |
|
| 15 | + 'server' => '127.0.0.1', |
|
| 16 | + 'port' => '6379', |
|
| 17 | + 'persistent' => '', |
|
| 18 | + 'database' => '0', |
|
| 19 | + 'force_standalone' => '0', |
|
| 20 | + 'connect_retries' => '1', |
|
| 21 | + 'read_timeout' => '10', |
|
| 22 | + 'automatic_cleaning_factor' => '0', |
|
| 23 | + 'compress_data' => '1', |
|
| 24 | + 'compress_tags' => '1', |
|
| 25 | + 'compress_threshold' => '20480', |
|
| 26 | + 'compression_lib' => 'gzip', |
|
| 27 | 27 | ) |
| 28 | - ), |
|
| 29 | - 'page_cache' => |
|
| 30 | - array ( |
|
| 31 | - 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 32 | - 'backend_options' => |
|
| 33 | - array ( |
|
| 34 | - 'server' => '127.0.0.1', |
|
| 35 | - 'port' => '6379', |
|
| 36 | - 'persistent' => '', |
|
| 37 | - 'database' => '1', |
|
| 38 | - 'force_standalone' => '0', |
|
| 39 | - 'connect_retries' => '1', |
|
| 40 | - 'read_timeout' => '10', |
|
| 41 | - 'automatic_cleaning_factor' => '0', |
|
| 42 | - 'compress_data' => '0', |
|
| 43 | - 'compress_tags' => '1', |
|
| 44 | - 'compress_threshold' => '20480', |
|
| 45 | - 'compression_lib' => 'gzip', |
|
| 46 | - ), |
|
| 47 | - ), |
|
| 48 | - ) |
|
| 49 | - ); |
|
| 28 | + ), |
|
| 29 | + 'page_cache' => |
|
| 30 | + array ( |
|
| 31 | + 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 32 | + 'backend_options' => |
|
| 33 | + array ( |
|
| 34 | + 'server' => '127.0.0.1', |
|
| 35 | + 'port' => '6379', |
|
| 36 | + 'persistent' => '', |
|
| 37 | + 'database' => '1', |
|
| 38 | + 'force_standalone' => '0', |
|
| 39 | + 'connect_retries' => '1', |
|
| 40 | + 'read_timeout' => '10', |
|
| 41 | + 'automatic_cleaning_factor' => '0', |
|
| 42 | + 'compress_data' => '0', |
|
| 43 | + 'compress_tags' => '1', |
|
| 44 | + 'compress_threshold' => '20480', |
|
| 45 | + 'compression_lib' => 'gzip', |
|
| 46 | + ), |
|
| 47 | + ), |
|
| 48 | + ) |
|
| 49 | + ); |
|
| 50 | 50 | |
| 51 | 51 | file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
@@ -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"; |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | protected $_config; |
| 17 | 17 | protected $_projectPath; |
| 18 | 18 | |
| 19 | - protected function configure() |
|
| 20 | - { |
|
| 19 | + protected function configure() { |
|
| 21 | 20 | $this->_projectPath = getcwd(); |
| 22 | 21 | $this->setName("index:mode:show"); |
| 23 | 22 | $this->setDescription("Show index mode"); |
@@ -29,8 +28,7 @@ discard block |
||
| 29 | 28 | * @param OutputInterface $output |
| 30 | 29 | * @return ProcessCommand|null |
| 31 | 30 | */ |
| 32 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 33 | - { |
|
| 31 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 34 | 32 | $index = $input->getArgument('index'); |
| 35 | 33 | |
| 36 | 34 | $command = $this->getCommand(new Config($output), $index); |
@@ -48,8 +46,7 @@ discard block |
||
| 48 | 46 | * @param $index |
| 49 | 47 | * @return bool|string |
| 50 | 48 | */ |
| 51 | - protected function getCommand(Config $config, $index) |
|
| 52 | - { |
|
| 49 | + protected function getCommand(Config $config, $index) { |
|
| 53 | 50 | $type = $config->type; |
| 54 | 51 | switch ($type) { |
| 55 | 52 | case 'magento2': |
@@ -56,6 +56,6 @@ |
||
| 56 | 56 | return "cd /var/www/public;bin/magento indexer:show-mode $index"; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - return false; |
|
| 59 | + return FALSE; |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | \ No newline at end of file |
@@ -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); |
@@ -14,8 +14,7 @@ |
||
| 14 | 14 | * |
| 15 | 15 | * @param $message |
| 16 | 16 | */ |
| 17 | - public static function send($message) |
|
| 18 | - { |
|
| 17 | + public static function send($message) { |
|
| 19 | 18 | $notifier = NotifierFactory::create(); |
| 20 | 19 | $basePath = dirname( __FILE__ ) . '/../../../'; |
| 21 | 20 | $notification = |