@@ -30,8 +30,8 @@ |
||
30 | 30 | { |
31 | 31 | /** |
32 | 32 | * RepositoryDefinition constructor. |
33 | - * @param $id |
|
34 | - * @param $refClass |
|
33 | + * @param string $id |
|
34 | + * @param \ReflectionClass $refClass |
|
35 | 35 | */ |
36 | 36 | public function __construct($id, $refClass) |
37 | 37 | { |
@@ -161,7 +161,9 @@ |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if (!empty($components)) { |
164 | - if ($snippets) $snippets .= PHP_EOL; |
|
164 | + if ($snippets) { |
|
165 | + $snippets .= PHP_EOL; |
|
166 | + } |
|
165 | 167 | $snippets .= $wiring->generate($twig, $components); |
166 | 168 | $snippets .= $wiring->generateExtend($twig, $components); |
167 | 169 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function register(Container $app) |
14 | 14 | { |
15 | - $app['eccube.di'] = function (Container $app) { |
|
15 | + $app['eccube.di'] = function(Container $app) { |
|
16 | 16 | $di = new DependencyBuilder( |
17 | 17 | $app['eccube.di.generator.dir'], |
18 | 18 | $app['eccube.di.generator.class'], |
@@ -1,31 +1,31 @@ |
||
1 | 1 | <?php return [ |
2 | - 'root_dir' => '%ROOT_DIR%', |
|
3 | - 'root_urlpath' => env('ECCUBE_ROOT_URLPATH', null), |
|
4 | - 'template_code' => env('ECCUBE_TEMPLATE_CODE','default'), |
|
5 | - 'admin_route' => env('ECCUBE_ADMIN_ROUTE','admin'), |
|
6 | - 'user_data_route' => env('ECCUBE_USER_DATA_ROUTE', 'user_data'), |
|
7 | - 'public_path' => env('ECCUBE_ROOT_URLPATH', null).'/html', |
|
8 | - 'public_path_realdir' => '%ROOT_DIR%/html', |
|
9 | - 'image_save_realdir' => '%ROOT_DIR%/html/upload/save_image', |
|
10 | - 'image_temp_realdir' => '%ROOT_DIR%/html/upload/temp_image', |
|
11 | - 'user_data_realdir' => '%ROOT_DIR%/html/user_data', |
|
12 | - 'block_default_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/default/Block', |
|
13 | - 'block_realdir' => '%ROOT_DIR%/app/template/default/Block', |
|
14 | - 'template_default_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/default', |
|
15 | - 'template_default_html_realdir' => '%ROOT_DIR%/html/template/default', |
|
16 | - 'template_admin_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/admin', |
|
17 | - 'template_admin_html_realdir' => '%ROOT_DIR%/html/template/admin', |
|
18 | - 'template_realdir' => '%ROOT_DIR%/app/template/default', |
|
19 | - 'template_html_realdir' => '%ROOT_DIR%/html/template/default', |
|
20 | - 'template_temp_realdir' => '%ROOT_DIR%/app/cache/eccube/template', |
|
21 | - 'csv_temp_realdir' => '%ROOT_DIR%/app/cache/eccube/csv', |
|
22 | - 'plugin_realdir' => '%ROOT_DIR%/app/Plugin', |
|
23 | - 'plugin_temp_realdir' => '%ROOT_DIR%/app/cache/plugin', |
|
24 | - 'plugin_html_realdir' => '%ROOT_DIR%/html/plugin', |
|
25 | - 'admin_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/template/admin', |
|
26 | - 'front_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/template/default', |
|
27 | - 'image_save_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/upload/save_image', |
|
28 | - 'image_temp_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/upload/temp_image', |
|
29 | - 'user_data_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/user_data', |
|
30 | - 'plugin_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/plugin', |
|
2 | + 'root_dir' => '%ROOT_DIR%', |
|
3 | + 'root_urlpath' => env('ECCUBE_ROOT_URLPATH', null), |
|
4 | + 'template_code' => env('ECCUBE_TEMPLATE_CODE','default'), |
|
5 | + 'admin_route' => env('ECCUBE_ADMIN_ROUTE','admin'), |
|
6 | + 'user_data_route' => env('ECCUBE_USER_DATA_ROUTE', 'user_data'), |
|
7 | + 'public_path' => env('ECCUBE_ROOT_URLPATH', null).'/html', |
|
8 | + 'public_path_realdir' => '%ROOT_DIR%/html', |
|
9 | + 'image_save_realdir' => '%ROOT_DIR%/html/upload/save_image', |
|
10 | + 'image_temp_realdir' => '%ROOT_DIR%/html/upload/temp_image', |
|
11 | + 'user_data_realdir' => '%ROOT_DIR%/html/user_data', |
|
12 | + 'block_default_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/default/Block', |
|
13 | + 'block_realdir' => '%ROOT_DIR%/app/template/default/Block', |
|
14 | + 'template_default_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/default', |
|
15 | + 'template_default_html_realdir' => '%ROOT_DIR%/html/template/default', |
|
16 | + 'template_admin_realdir' => '%ROOT_DIR%/src/Eccube/Resource/template/admin', |
|
17 | + 'template_admin_html_realdir' => '%ROOT_DIR%/html/template/admin', |
|
18 | + 'template_realdir' => '%ROOT_DIR%/app/template/default', |
|
19 | + 'template_html_realdir' => '%ROOT_DIR%/html/template/default', |
|
20 | + 'template_temp_realdir' => '%ROOT_DIR%/app/cache/eccube/template', |
|
21 | + 'csv_temp_realdir' => '%ROOT_DIR%/app/cache/eccube/csv', |
|
22 | + 'plugin_realdir' => '%ROOT_DIR%/app/Plugin', |
|
23 | + 'plugin_temp_realdir' => '%ROOT_DIR%/app/cache/plugin', |
|
24 | + 'plugin_html_realdir' => '%ROOT_DIR%/html/plugin', |
|
25 | + 'admin_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/template/admin', |
|
26 | + 'front_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/template/default', |
|
27 | + 'image_save_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/upload/save_image', |
|
28 | + 'image_temp_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/upload/temp_image', |
|
29 | + 'user_data_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/user_data', |
|
30 | + 'plugin_urlpath' => env('ECCUBE_ROOT_URLPATH', null).'/html/plugin', |
|
31 | 31 | ]; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php return [ |
2 | 2 | 'root_dir' => '%ROOT_DIR%', |
3 | 3 | 'root_urlpath' => env('ECCUBE_ROOT_URLPATH', null), |
4 | - 'template_code' => env('ECCUBE_TEMPLATE_CODE','default'), |
|
5 | - 'admin_route' => env('ECCUBE_ADMIN_ROUTE','admin'), |
|
4 | + 'template_code' => env('ECCUBE_TEMPLATE_CODE', 'default'), |
|
5 | + 'admin_route' => env('ECCUBE_ADMIN_ROUTE', 'admin'), |
|
6 | 6 | 'user_data_route' => env('ECCUBE_USER_DATA_ROUTE', 'user_data'), |
7 | 7 | 'public_path' => env('ECCUBE_ROOT_URLPATH', null).'/html', |
8 | 8 | 'public_path_realdir' => '%ROOT_DIR%/html', |
@@ -194,7 +194,7 @@ |
||
194 | 194 | |
195 | 195 | /** |
196 | 196 | * EntityからTraitを削除. |
197 | - * @param $entityTokens Tokens Entityのトークン |
|
197 | + * @param Tokens $entityTokens Tokens Entityのトークン |
|
198 | 198 | * @param $trait string 削除するTraitのFQCN |
199 | 199 | */ |
200 | 200 | private function removeTrait($entityTokens, $trait) |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use Eccube\Application; |
31 | 31 | use Eccube\Entity\Plugin; |
32 | 32 | use Eccube\Exception\PluginException; |
33 | -use Eccube\Plugin\ConfigManager; |
|
34 | 33 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
35 | 34 | use Eccube\Repository\PluginEventHandlerRepository; |
36 | 35 | use Eccube\Repository\PluginRepository; |
@@ -91,6 +91,10 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -143,7 +143,7 @@ discard block |
||
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 |
||
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); |