@@ -15,8 +15,7 @@ discard block |
||
| 15 | 15 | protected $_config; |
| 16 | 16 | protected $_projectPath; |
| 17 | 17 | |
| 18 | - protected function configure() |
|
| 19 | - { |
|
| 18 | + protected function configure() { |
|
| 20 | 19 | $this->_projectPath = getcwd(); |
| 21 | 20 | $this->setName("cache:disable"); |
| 22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
| 27 | 26 | * @param OutputInterface $output |
| 28 | 27 | * @return ProcessCommand |
| 29 | 28 | */ |
| 30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 31 | - { |
|
| 29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
| 33 | 31 | |
| 34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
| 40 | 38 | * @param Config $config |
| 41 | 39 | * @return bool|string |
| 42 | 40 | */ |
| 43 | - protected function getCommand(Config $config) |
|
| 44 | - { |
|
| 41 | + protected function getCommand(Config $config) { |
|
| 45 | 42 | $type = $config->type; |
| 46 | 43 | switch ($type) { |
| 47 | 44 | case 'magento': |
@@ -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': |
@@ -15,8 +15,7 @@ discard block |
||
| 15 | 15 | protected $_config; |
| 16 | 16 | protected $_projectPath; |
| 17 | 17 | |
| 18 | - protected function configure() |
|
| 19 | - { |
|
| 18 | + protected function configure() { |
|
| 20 | 19 | $this->_projectPath = getcwd(); |
| 21 | 20 | $this->setName("cache:disable"); |
| 22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
| 27 | 26 | * @param OutputInterface $output |
| 28 | 27 | * @return ProcessCommand |
| 29 | 28 | */ |
| 30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 31 | - { |
|
| 29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
| 33 | 31 | |
| 34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
| 40 | 38 | * @param Config $config |
| 41 | 39 | * @return bool|string |
| 42 | 40 | */ |
| 43 | - protected function getCommand(Config $config) |
|
| 44 | - { |
|
| 41 | + protected function getCommand(Config $config) { |
|
| 45 | 42 | $type = $config->type; |
| 46 | 43 | switch ($type) { |
| 47 | 44 | case 'magento': |
@@ -15,8 +15,7 @@ discard block |
||
| 15 | 15 | protected $_config; |
| 16 | 16 | protected $_projectPath; |
| 17 | 17 | |
| 18 | - protected function configure() |
|
| 19 | - { |
|
| 18 | + protected function configure() { |
|
| 20 | 19 | $this->_projectPath = getcwd(); |
| 21 | 20 | $this->setName("cache:disable"); |
| 22 | 21 | $this->setDescription("Disable cache types"); |
@@ -27,8 +26,7 @@ discard block |
||
| 27 | 26 | * @param OutputInterface $output |
| 28 | 27 | * @return ProcessCommand |
| 29 | 28 | */ |
| 30 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 31 | - { |
|
| 29 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 32 | 30 | $output->writeln('<info>Disabling all cache types</info>'); |
| 33 | 31 | |
| 34 | 32 | $command = $this->getCommand(new Config($output)); |
@@ -40,8 +38,7 @@ discard block |
||
| 40 | 38 | * @param Config $config |
| 41 | 39 | * @return bool|string |
| 42 | 40 | */ |
| 43 | - protected function getCommand(Config $config) |
|
| 44 | - { |
|
| 41 | + protected function getCommand(Config $config) { |
|
| 45 | 42 | $type = $config->type; |
| 46 | 43 | switch ($type) { |
| 47 | 44 | case 'magento': |
@@ -4,4 +4,6 @@ |
||
| 4 | 4 | * Class ExistingProjectException |
| 5 | 5 | * @package Magestead\Exceptions |
| 6 | 6 | */ |
| 7 | -class ExistingProjectException extends \Exception {} |
|
| 8 | 7 | \ No newline at end of file |
| 8 | +class ExistingProjectException extends \Exception |
|
| 9 | +{ |
|
| 10 | +} |
|
| 9 | 11 | \ No newline at end of file |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | protected $_projectPath; |
| 23 | 23 | protected $_msConfig; |
| 24 | 24 | |
| 25 | - protected function configure() |
|
| 26 | - { |
|
| 25 | + protected function configure() { |
|
| 27 | 26 | $this->_basePath = dirname( __FILE__ ) . '/../../../'; |
| 28 | 27 | $this->_projectPath = getcwd(); |
| 29 | 28 | |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * @return \Magestead\Installers\Magento2Project|\Magestead\Installers\MagentoProject |
| 40 | 39 | * @throws ExistingProjectException |
| 41 | 40 | */ |
| 42 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 43 | - { |
|
| 41 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 44 | 42 | $project = $this->setProject($input); |
| 45 | 43 | |
| 46 | 44 | $helper = $this->getHelper('question'); |
@@ -59,8 +57,7 @@ discard block |
||
| 59 | 57 | * @param $target |
| 60 | 58 | * @param OutputInterface $output |
| 61 | 59 | */ |
| 62 | - protected function copyConfigFiles($source, $target, OutputInterface $output) |
|
| 63 | - { |
|
| 60 | + protected function copyConfigFiles($source, $target, OutputInterface $output) { |
|
| 64 | 61 | try { |
| 65 | 62 | $progress = new ProgressBar($output, 3720); |
| 66 | 63 | $progress->start(); |
@@ -87,8 +84,7 @@ discard block |
||
| 87 | 84 | * @param array $options |
| 88 | 85 | * @param OutputInterface $output |
| 89 | 86 | */ |
| 90 | - protected function configureProject(array $options, OutputInterface $output) |
|
| 91 | - { |
|
| 87 | + protected function configureProject(array $options, OutputInterface $output) { |
|
| 92 | 88 | $msConfig = $this->getConfigFile($output); |
| 93 | 89 | |
| 94 | 90 | $app = ($options['app'] == 'magento2') ? 'magento2' : 'magento'; |
@@ -116,8 +112,7 @@ discard block |
||
| 116 | 112 | * @param OutputInterface $output |
| 117 | 113 | * @return mixed |
| 118 | 114 | */ |
| 119 | - protected function getConfigFile(OutputInterface $output) |
|
| 120 | - { |
|
| 115 | + protected function getConfigFile(OutputInterface $output) { |
|
| 121 | 116 | $yaml = new Parser(); |
| 122 | 117 | try { |
| 123 | 118 | return $yaml->parse(file_get_contents($this->_projectPath . '/magestead.yaml')); |
@@ -131,8 +126,7 @@ discard block |
||
| 131 | 126 | * @param array $config |
| 132 | 127 | * @param OutputInterface $output |
| 133 | 128 | */ |
| 134 | - protected function saveConfigFile(array $config, OutputInterface $output) |
|
| 135 | - { |
|
| 129 | + protected function saveConfigFile(array $config, OutputInterface $output) { |
|
| 136 | 130 | $dumper = new Dumper(); |
| 137 | 131 | $yaml = $dumper->dump($config, 6); |
| 138 | 132 | |
@@ -147,8 +141,7 @@ discard block |
||
| 147 | 141 | * @param OutputInterface $output |
| 148 | 142 | * @param $options |
| 149 | 143 | */ |
| 150 | - protected function setupProject(OutputInterface $output, $options) |
|
| 151 | - { |
|
| 144 | + protected function setupProject(OutputInterface $output, $options) { |
|
| 152 | 145 | $output->writeln('<info>Setting up project structure</info>'); |
| 153 | 146 | $provisionFolder = $this->_basePath . "provision"; |
| 154 | 147 | $this->copyConfigFiles($provisionFolder, $this->_projectPath, $output); |
@@ -160,8 +153,7 @@ discard block |
||
| 160 | 153 | * @return mixed |
| 161 | 154 | * @throws ExistingProjectException |
| 162 | 155 | */ |
| 163 | - protected function setProject(InputInterface $input) |
|
| 164 | - { |
|
| 156 | + protected function setProject(InputInterface $input) { |
|
| 165 | 157 | $project = $input->getArgument('project'); |
| 166 | 158 | $this->_projectPath = $this->_projectPath . '/' . $project; |
| 167 | 159 | |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | * UsageApi constructor. |
| 22 | 22 | * @param $data |
| 23 | 23 | */ |
| 24 | - public function __construct($data) |
|
| 25 | - { |
|
| 24 | + public function __construct($data) { |
|
| 26 | 25 | $this->_params['os_type'] = urlencode($data['os']); |
| 27 | 26 | $this->_params['server_type'] = urlencode($data['server']); |
| 28 | 27 | $this->_params['php_version'] = urlencode($data['phpver']); |
@@ -38,8 +37,7 @@ discard block |
||
| 38 | 37 | /** |
| 39 | 38 | * |
| 40 | 39 | */ |
| 41 | - public function send() |
|
| 42 | - { |
|
| 40 | + public function send() { |
|
| 43 | 41 | $fields_string = $this->getFieldsString(); |
| 44 | 42 | |
| 45 | 43 | $ch = curl_init(); |
@@ -58,8 +56,7 @@ discard block |
||
| 58 | 56 | /** |
| 59 | 57 | * @return string |
| 60 | 58 | */ |
| 61 | - protected function getFieldsString() |
|
| 62 | - { |
|
| 59 | + protected function getFieldsString() { |
|
| 63 | 60 | $fields_string = ''; |
| 64 | 61 | foreach ($this->_params as $key => $value) { |
| 65 | 62 | $fields_string .= $key . '=' . $value . '&'; |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Configure the view command |
| 21 | 21 | */ |
| 22 | - protected function configure() |
|
| 23 | - { |
|
| 22 | + protected function configure() { |
|
| 24 | 23 | $this->_projectPath = getcwd(); |
| 25 | 24 | $this->setName("log:view"); |
| 26 | 25 | $this->setDescription("View a specific server log"); |
@@ -32,8 +31,7 @@ discard block |
||
| 32 | 31 | * @param OutputInterface $output |
| 33 | 32 | * @return ProcessCommand |
| 34 | 33 | */ |
| 35 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 36 | - { |
|
| 34 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 37 | 35 | $log = $input->getArgument('log'); |
| 38 | 36 | |
| 39 | 37 | $output->writeln('<info>Viewing '. ucwords($log) . ' Log</info>'); |
@@ -51,8 +49,7 @@ discard block |
||
| 51 | 49 | * @param $log |
| 52 | 50 | * @return string |
| 53 | 51 | */ |
| 54 | - private function getCommand(Config $config, $log) |
|
| 55 | - { |
|
| 52 | + private function getCommand(Config $config, $log) { |
|
| 56 | 53 | $server = $config->_config['magestead']['server']; |
| 57 | 54 | $os = $config->_config['magestead']['os']; |
| 58 | 55 | |
@@ -67,8 +64,7 @@ discard block |
||
| 67 | 64 | * @param $os |
| 68 | 65 | * @return string |
| 69 | 66 | */ |
| 70 | - private function getLogLocation($server, $os) |
|
| 71 | - { |
|
| 67 | + private function getLogLocation($server, $os) { |
|
| 72 | 68 | $location = 'nginx'; |
| 73 | 69 | if ($server != 'nginx') { |
| 74 | 70 | $location = ($os == 'ubuntu14') ? 'apache2' : 'httpd'; |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Configure the view command |
| 21 | 21 | */ |
| 22 | - protected function configure() |
|
| 23 | - { |
|
| 22 | + protected function configure() { |
|
| 24 | 23 | $this->_projectPath = getcwd(); |
| 25 | 24 | $this->setName("log:view"); |
| 26 | 25 | $this->setDescription("View a specific server log"); |
@@ -32,8 +31,7 @@ discard block |
||
| 32 | 31 | * @param OutputInterface $output |
| 33 | 32 | * @return ProcessCommand |
| 34 | 33 | */ |
| 35 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 36 | - { |
|
| 34 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 37 | 35 | $log = $input->getArgument('log'); |
| 38 | 36 | |
| 39 | 37 | $output->writeln('<info>Viewing '. ucwords($log) . ' Log</info>'); |
@@ -51,8 +49,7 @@ discard block |
||
| 51 | 49 | * @param $log |
| 52 | 50 | * @return string |
| 53 | 51 | */ |
| 54 | - private function getCommand(Config $config, $log) |
|
| 55 | - { |
|
| 52 | + private function getCommand(Config $config, $log) { |
|
| 56 | 53 | $server = $config->_config['magestead']['server']; |
| 57 | 54 | $os = $config->_config['magestead']['os']; |
| 58 | 55 | |
@@ -67,8 +64,7 @@ discard block |
||
| 67 | 64 | * @param $os |
| 68 | 65 | * @return string |
| 69 | 66 | */ |
| 70 | - private function getLogLocation($server, $os) |
|
| 71 | - { |
|
| 67 | + private function getLogLocation($server, $os) { |
|
| 72 | 68 | $location = 'nginx'; |
| 73 | 69 | if ($server != 'nginx') { |
| 74 | 70 | $location = ($os == 'ubuntu14') ? 'apache2' : 'httpd'; |