@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * |
| 107 | 107 | * @param string $path path to tar.gz/zip plugin file |
| 108 | 108 | * @param int $source |
| 109 | - * @return mixed |
|
| 109 | + * @return string |
|
| 110 | 110 | * @throws PluginException |
| 111 | 111 | * @throws \Exception |
| 112 | 112 | */ |
@@ -161,6 +161,10 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | // インストール事後処理 |
| 164 | + |
|
| 165 | + /** |
|
| 166 | + * @param integer $source |
|
| 167 | + */ |
|
| 164 | 168 | public function postInstall($config, $event, $source) |
| 165 | 169 | { |
| 166 | 170 | // Proxyのクラスをロードせずにスキーマを更新するために、 |
@@ -207,6 +211,9 @@ discard block |
||
| 207 | 211 | } |
| 208 | 212 | } |
| 209 | 213 | |
| 214 | + /** |
|
| 215 | + * @param string $dir |
|
| 216 | + */ |
|
| 210 | 217 | public function unpackPluginArchive($archive, $dir) |
| 211 | 218 | { |
| 212 | 219 | $extension = pathinfo($archive, PATHINFO_EXTENSION); |
@@ -266,6 +273,9 @@ discard block |
||
| 266 | 273 | } |
| 267 | 274 | } |
| 268 | 275 | |
| 276 | + /** |
|
| 277 | + * @param string $yml |
|
| 278 | + */ |
|
| 269 | 279 | public function readYml($yml) |
| 270 | 280 | { |
| 271 | 281 | if (file_exists($yml)) { |
@@ -283,6 +293,9 @@ discard block |
||
| 283 | 293 | // ディレクトリ名などに使われれるので厳しめ |
| 284 | 294 | } |
| 285 | 295 | |
| 296 | + /** |
|
| 297 | + * @param string $path |
|
| 298 | + */ |
|
| 286 | 299 | public function deleteFile($path) |
| 287 | 300 | { |
| 288 | 301 | $f = new Filesystem(); |
@@ -302,6 +315,9 @@ discard block |
||
| 302 | 315 | return $this->appConfig['plugin_realdir'].'/'.$name; |
| 303 | 316 | } |
| 304 | 317 | |
| 318 | + /** |
|
| 319 | + * @param string $d |
|
| 320 | + */ |
|
| 305 | 321 | public function createPluginDir($d) |
| 306 | 322 | { |
| 307 | 323 | $b = @mkdir($d); |
@@ -359,6 +375,9 @@ discard block |
||
| 359 | 375 | return $p; |
| 360 | 376 | } |
| 361 | 377 | |
| 378 | + /** |
|
| 379 | + * @param string $method |
|
| 380 | + */ |
|
| 362 | 381 | public function callPluginManagerMethod($meta, $method) |
| 363 | 382 | { |
| 364 | 383 | $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager'; |
@@ -475,6 +494,9 @@ discard block |
||
| 475 | 494 | return true; |
| 476 | 495 | } |
| 477 | 496 | |
| 497 | + /** |
|
| 498 | + * @param string $path |
|
| 499 | + */ |
|
| 478 | 500 | public function update(\Eccube\Entity\Plugin $plugin, $path) |
| 479 | 501 | { |
| 480 | 502 | $pluginBaseDir = null; |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | { |
| 166 | 166 | // Proxyのクラスをロードせずにスキーマを更新するために、 |
| 167 | 167 | // インストール時には一時的なディレクトリにProxyを生成する |
| 168 | - $tmpProxyOutputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12); |
|
| 168 | + $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.Str::random(12); |
|
| 169 | 169 | @mkdir($tmpProxyOutputDir); |
| 170 | 170 | |
| 171 | 171 | try { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | if (!empty($config_cache)) { |
| 232 | 232 | $meta = $config_cache; |
| 233 | 233 | } else { |
| 234 | - $meta = $this->readYml($dir . '/config.yml'); |
|
| 234 | + $meta = $this->readYml($dir.'/config.yml'); |
|
| 235 | 235 | } |
| 236 | 236 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
| 237 | 237 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | { |
| 822 | 822 | $result = array_keys($packages); |
| 823 | 823 | if ($getVersion) { |
| 824 | - $result = array_map(function ($package, $version) { |
|
| 824 | + $result = array_map(function($package, $version) { |
|
| 825 | 825 | return $package.':'.$version; |
| 826 | 826 | }, array_keys($packages), array_values($packages)); |
| 827 | 827 | } |