@@ -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'; |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param OutputInterface $output |
| 18 | 18 | */ |
| 19 | - public function __construct(OutputInterface $output) |
|
| 20 | - { |
|
| 19 | + public function __construct(OutputInterface $output) { |
|
| 21 | 20 | $this->_projectPath = getcwd(); |
| 22 | 21 | $this->_config = $this->getConfigFile($output); |
| 23 | 22 | } |
@@ -27,8 +26,7 @@ discard block |
||
| 27 | 26 | * |
| 28 | 27 | * @return mixed |
| 29 | 28 | */ |
| 30 | - public function __get($name) |
|
| 31 | - { |
|
| 29 | + public function __get($name) { |
|
| 32 | 30 | return $this->_config['magestead']['apps']['mba_12345'][$name]; |
| 33 | 31 | } |
| 34 | 32 | |
@@ -37,8 +35,7 @@ discard block |
||
| 37 | 35 | * |
| 38 | 36 | * @return bool|mixed |
| 39 | 37 | */ |
| 40 | - protected function getConfigFile(OutputInterface $output) |
|
| 41 | - { |
|
| 38 | + protected function getConfigFile(OutputInterface $output) { |
|
| 42 | 39 | $config = new Parser(); |
| 43 | 40 | try { |
| 44 | 41 | return $config->parse($this->readConfigFile()); |
@@ -54,8 +51,7 @@ discard block |
||
| 54 | 51 | * |
| 55 | 52 | * @return string |
| 56 | 53 | */ |
| 57 | - protected function readConfigFile() |
|
| 58 | - { |
|
| 54 | + protected function readConfigFile() { |
|
| 59 | 55 | if (!file_exists($this->_projectPath.'/magestead.yaml')) { |
| 60 | 56 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
| 61 | 57 | } |
@@ -57,20 +57,20 @@ |
||
| 57 | 57 | public function getAllOptions() |
| 58 | 58 | { |
| 59 | 59 | return [ |
| 60 | - 'app' => $this->_app, |
|
| 61 | - 'server' => $this->_server, |
|
| 62 | - 'phpver' => $this->_phpVer, |
|
| 63 | - 'os' => $this->_os, |
|
| 64 | - 'box' => $this->_box, |
|
| 65 | - 'm2user' => $this->_m2Username, |
|
| 66 | - 'm2pass' => $this->_m2Password, |
|
| 67 | - 'repo_url' => $this->_repoUrl, |
|
| 68 | - 'ip_address' => $this->_ipAddress, |
|
| 69 | - 'cpus' => $this->_cpus, |
|
| 70 | - 'memory_limit' => $this->_memorylimit, |
|
| 71 | - 'locale' => $this->_locale, |
|
| 72 | - 'default_currency' => $this->_currency, |
|
| 73 | - 'base_url' => $this->_baseUrl, |
|
| 60 | + 'app' => $this->_app, |
|
| 61 | + 'server' => $this->_server, |
|
| 62 | + 'phpver' => $this->_phpVer, |
|
| 63 | + 'os' => $this->_os, |
|
| 64 | + 'box' => $this->_box, |
|
| 65 | + 'm2user' => $this->_m2Username, |
|
| 66 | + 'm2pass' => $this->_m2Password, |
|
| 67 | + 'repo_url' => $this->_repoUrl, |
|
| 68 | + 'ip_address' => $this->_ipAddress, |
|
| 69 | + 'cpus' => $this->_cpus, |
|
| 70 | + 'memory_limit' => $this->_memorylimit, |
|
| 71 | + 'locale' => $this->_locale, |
|
| 72 | + 'default_currency' => $this->_currency, |
|
| 73 | + 'base_url' => $this->_baseUrl, |
|
| 74 | 74 | ]; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | $env = include $file; |
| 5 | 5 | |
| 6 | 6 | $env['cache'] = |
| 7 | - [ |
|
| 7 | + [ |
|
| 8 | 8 | 'frontend' => [ |
| 9 | 9 | 'default' => [ |
| 10 | 10 | 'backend' => 'Cm_Cache_Backend_Redis', |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | ], |
| 25 | 25 | ], |
| 26 | 26 | 'page_cache' => [ |
| 27 | - 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 28 | - 'backend_options' => [ |
|
| 27 | + 'backend' => 'Cm_Cache_Backend_Redis', |
|
| 28 | + 'backend_options' => [ |
|
| 29 | 29 | 'server' => '127.0.0.1', |
| 30 | 30 | 'port' => '6379', |
| 31 | 31 | 'persistent' => '', |