Completed
Push — experimental/3.1 ( ed247b...74d84b )
by Kiyotaka
222:16 queued 222:00
created
src/Eccube/Service/PluginService.php 2 patches
Doc Comments   +26 added lines patch added patch discarded remove patch
@@ -91,6 +91,10 @@  discard block
 block discarded – undo
91 91
     const EVENT_YML = 'event.yml';
92 92
 
93 93
     // ファイル指定してのプラグインインストール
94
+
95
+    /**
96
+     * @param string $path
97
+     */
94 98
     public function install($path, $source = 0)
95 99
     {
96 100
         $pluginBaseDir = null;
@@ -139,6 +143,10 @@  discard block
 block discarded – undo
139 143
     }
140 144
 
141 145
     // インストール事後処理
146
+
147
+    /**
148
+     * @param integer $source
149
+     */
142 150
     public function postInstall($config, $event, $source)
143 151
     {
144 152
         // Proxyのクラスをロードせずにスキーマを更新するために、
@@ -185,6 +193,9 @@  discard block
 block discarded – undo
185 193
         }
186 194
     }
187 195
 
196
+    /**
197
+     * @param string $dir
198
+     */
188 199
     public function unpackPluginArchive($archive, $dir)
189 200
     {
190 201
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -244,6 +255,9 @@  discard block
 block discarded – undo
244 255
         }
245 256
     }
246 257
 
258
+    /**
259
+     * @param string $yml
260
+     */
247 261
     public function readYml($yml)
248 262
     {
249 263
         if (file_exists($yml)) {
@@ -261,6 +275,9 @@  discard block
 block discarded – undo
261 275
         // ディレクトリ名などに使われれるので厳しめ
262 276
     }
263 277
 
278
+    /**
279
+     * @param string $path
280
+     */
264 281
     public function deleteFile($path)
265 282
     {
266 283
         $f = new Filesystem();
@@ -280,6 +297,9 @@  discard block
 block discarded – undo
280 297
         return $this->appConfig['plugin_realdir'].'/'.$name;
281 298
     }
282 299
 
300
+    /**
301
+     * @param string $d
302
+     */
283 303
     public function createPluginDir($d)
284 304
     {
285 305
         $b = @mkdir($d);
@@ -337,6 +357,9 @@  discard block
 block discarded – undo
337 357
         return $p;
338 358
     }
339 359
 
360
+    /**
361
+     * @param string $method
362
+     */
340 363
     public function callPluginManagerMethod($meta, $method)
341 364
     {
342 365
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
@@ -453,6 +476,9 @@  discard block
 block discarded – undo
453 476
         return true;
454 477
     }
455 478
 
479
+    /**
480
+     * @param string $path
481
+     */
456 482
     public function update(\Eccube\Entity\Plugin $plugin, $path)
457 483
     {
458 484
         $pluginBaseDir = null;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         // Proxyのクラスをロードせずにスキーマを更新するために、
145 145
         // インストール時には一時的なディレクトリにProxyを生成する
146
-        $tmpProxyOutputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12);
146
+        $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.Str::random(12);
147 147
         @mkdir($tmpProxyOutputDir);
148 148
 
149 149
         try {
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             if (!empty($config_cache)) {
210 210
                 $meta = $config_cache;
211 211
             } else {
212
-                $meta = $this->readYml($dir . '/config.yml');
212
+                $meta = $this->readYml($dir.'/config.yml');
213 213
             }
214 214
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
215 215
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
Please login to merge, or discard this patch.