@@ -234,7 +234,7 @@ |
||
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | 236 | * Get mode |
| 237 | - * @return mixed|string |
|
| 237 | + * @return string |
|
| 238 | 238 | */ |
| 239 | 239 | public function getMode() |
| 240 | 240 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 40 | 40 | $installedLogs = array_filter( |
| 41 | 41 | array_map( |
| 42 | - function ($line) { |
|
| 42 | + function($line) { |
|
| 43 | 43 | $matches = array(); |
| 44 | 44 | preg_match('/^ - Installing (.*?) \((.*?)\) .*/', $line, $matches); |
| 45 | 45 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public static function parseInfo($output) |
| 63 | 63 | { |
| 64 | 64 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 65 | - $infoLogs = array_filter(array_map(function ($line) { |
|
| 65 | + $infoLogs = array_filter(array_map(function($line) { |
|
| 66 | 66 | $matches = array(); |
| 67 | 67 | preg_match('/^(name|descrip.|keywords|versions|type|license|source|dist|names)\s*:\s*(.*)$/', $line, $matches); |
| 68 | 68 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public static function parseConfig($output) |
| 87 | 87 | { |
| 88 | 88 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 89 | - $rowArray = array_filter($rowArray, function ($line) { |
|
| 89 | + $rowArray = array_filter($rowArray, function($line) { |
|
| 90 | 90 | return !preg_match('/^<warning>.*/', $line); |
| 91 | 91 | }); |
| 92 | 92 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | public static function parseList($output) |
| 103 | 103 | { |
| 104 | 104 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 105 | - $rawConfig = array_map(function ($line) { |
|
| 105 | + $rawConfig = array_map(function($line) { |
|
| 106 | 106 | $matches = array(); |
| 107 | 107 | preg_match('/^\[(.*?)\]\s?(.*)$/', $line, $matches); |
| 108 | 108 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | public static function parseComposerVersion($output) |
| 160 | 160 | { |
| 161 | 161 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 162 | - $rowArray = array_filter($rowArray, function ($line) { |
|
| 162 | + $rowArray = array_filter($rowArray, function($line) { |
|
| 163 | 163 | return preg_match('/^Composer */', $line); |
| 164 | 164 | }); |
| 165 | 165 | return array_shift($rowArray); |
@@ -269,7 +269,7 @@ |
||
| 269 | 269 | public function composerVersion() |
| 270 | 270 | { |
| 271 | 271 | $this->init(); |
| 272 | - $command = $this->pathPHP . ' ' . $this->composerFile . ' -V'; |
|
| 272 | + $command = $this->pathPHP.' '.$this->composerFile.' -V'; |
|
| 273 | 273 | return exec($command); |
| 274 | 274 | } |
| 275 | 275 | |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | 236 | * Get mode |
| 237 | - * @return mixed|string |
|
| 237 | + * @return string |
|
| 238 | 238 | */ |
| 239 | 239 | public function getMode() |
| 240 | 240 | { |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $packageNames = ''; |
| 252 | 252 | if (!empty($dependents)) { |
| 253 | 253 | foreach ($dependents as $item) { |
| 254 | - $packageNames .= self::$vendorName . '/' . $item['product_code'] . ' '; |
|
| 254 | + $packageNames .= self::$vendorName.'/'.$item['product_code'].' '; |
|
| 255 | 255 | $pluginItem = [ |
| 256 | 256 | "product_code" => $item['product_code'], |
| 257 | 257 | "version" => $item['version'] |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | array_push($dependentModifier, $pluginItem); |
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | - $packageNames .= self::$vendorName . '/' . $pluginCode; |
|
| 262 | + $packageNames .= self::$vendorName.'/'.$pluginCode; |
|
| 263 | 263 | $return = $this->composerService->execRequire($packageNames); |
| 264 | 264 | $data = array( |
| 265 | 265 | 'code' => $pluginCode, |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | 'core_version' => $eccubeVersion, |
| 268 | 268 | 'php_version' => phpversion(), |
| 269 | 269 | 'db_version' => $this->systemService->getDbversion(), |
| 270 | - 'os' => php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('v'), |
|
| 270 | + 'os' => php_uname('s').' '.php_uname('r').' '.php_uname('v'), |
|
| 271 | 271 | 'host' => $request->getHost(), |
| 272 | 272 | 'web_server' => $request->server->get("SERVER_SOFTWARE"), |
| 273 | 273 | 'composer_version' => $this->composerService->composerVersion(), |
@@ -275,13 +275,13 @@ discard block |
||
| 275 | 275 | 'dependents' => json_encode($dependentModifier) |
| 276 | 276 | ); |
| 277 | 277 | if ($return) { |
| 278 | - $url = $this->appConfig['package_repo_url'] . '/report'; |
|
| 278 | + $url = $this->appConfig['package_repo_url'].'/report'; |
|
| 279 | 279 | $this->postRequestApi($url, $data); |
| 280 | 280 | $app->addSuccess('admin.plugin.install.complete', 'admin'); |
| 281 | 281 | |
| 282 | 282 | return $app->redirect($app->url('admin_store_plugin')); |
| 283 | 283 | } |
| 284 | - $url = $this->appConfig['package_repo_url'] . '/report/fail'; |
|
| 284 | + $url = $this->appConfig['package_repo_url'].'/report/fail'; |
|
| 285 | 285 | $this->postRequestApi($url, $data); |
| 286 | 286 | $app->addError('admin.plugin.install.fail', 'admin'); |
| 287 | 287 | |