@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // リセットキーの発行・有効期限の設定 |
48 | 48 | $Customer |
49 | 49 | ->setResetKey($app['eccube.repository.customer']->getUniqueResetKey($app)) |
50 | - ->setResetExpire(new \DateTime('+' . $app['config']['customer_reset_expire'] .' min')); |
|
50 | + ->setResetExpire(new \DateTime('+'.$app['config']['customer_reset_expire'].' min')); |
|
51 | 51 | |
52 | 52 | // リセットキーを更新 |
53 | 53 | $app['orm.em']->persist($Customer); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | // ログ出力 |
63 | 63 | $app['monolog']->addInfo( |
64 | - 'send reset password mail to:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
64 | + 'send reset password mail to:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | // ログ出力 |
117 | 117 | $app['monolog']->addInfo( |
118 | - 'reset password complete:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
118 | + 'reset password complete:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
119 | 119 | ); |
120 | 120 | } else { |
121 | 121 | throw new HttpException\AccessDeniedHttpException('不正なアクセスです。'); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // 会員削除 |
61 | 61 | $email = $Customer->getEmail(); |
62 | 62 | // メールアドレスにダミーをセット |
63 | - $Customer->setEmail(Str::random(60) . '@dummy.dummy'); |
|
63 | + $Customer->setEmail(Str::random(60).'@dummy.dummy'); |
|
64 | 64 | $Customer->setDelFlg(Constant::ENABLED); |
65 | 65 | |
66 | 66 | $app['orm.em']->flush(); |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | |
61 | 61 | public function __construct() |
62 | 62 | { |
63 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
64 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
65 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
63 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
64 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
65 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | private function isValid(Request $request, Form $form) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | if (empty($sessionData['shop_name'])) { |
149 | 149 | |
150 | - $config_file = $this->config_path . '/config.yml'; |
|
150 | + $config_file = $this->config_path.'/config.yml'; |
|
151 | 151 | $fs = new Filesystem(); |
152 | 152 | |
153 | 153 | if ($fs->exists($config_file)) { |
@@ -161,21 +161,21 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | // セキュリティの設定 |
164 | - $config_file = $this->config_path . '/path.yml'; |
|
164 | + $config_file = $this->config_path.'/path.yml'; |
|
165 | 165 | $config = Yaml::parse(file_get_contents($config_file)); |
166 | 166 | $sessionData['admin_dir'] = $config['admin_route']; |
167 | 167 | |
168 | - $config_file = $this->config_path . '/config.yml'; |
|
168 | + $config_file = $this->config_path.'/config.yml'; |
|
169 | 169 | $config = Yaml::parse(file_get_contents($config_file)); |
170 | 170 | |
171 | 171 | $allowHost = $config['admin_allow_host']; |
172 | 172 | if (count($allowHost) > 0) { |
173 | 173 | $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost)); |
174 | 174 | } |
175 | - $sessionData['admin_force_ssl'] = (bool)$config['force_ssl']; |
|
175 | + $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
|
176 | 176 | |
177 | 177 | // メール設定 |
178 | - $config_file = $this->config_path . '/mail.yml'; |
|
178 | + $config_file = $this->config_path.'/mail.yml'; |
|
179 | 179 | $config = Yaml::parse(file_get_contents($config_file)); |
180 | 180 | $mail = $config['mail']; |
181 | 181 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $host = $request->getSchemeAndHttpHost(); |
286 | 286 | $basePath = $request->getBasePath(); |
287 | 287 | $params = array( |
288 | - 'http_url' => $host . $basePath, |
|
288 | + 'http_url' => $host.$basePath, |
|
289 | 289 | 'shop_name' => $sessionData['shop_name'], |
290 | 290 | ); |
291 | 291 | |
@@ -306,13 +306,13 @@ discard block |
||
306 | 306 | // インストール完了 |
307 | 307 | public function complete(InstallApplication $app, Request $request) |
308 | 308 | { |
309 | - $config_file = $this->config_path . '/path.yml'; |
|
309 | + $config_file = $this->config_path.'/path.yml'; |
|
310 | 310 | $config = Yaml::parse(file_get_contents($config_file)); |
311 | 311 | |
312 | 312 | $host = $request->getSchemeAndHttpHost(); |
313 | 313 | $basePath = $request->getBasePath(); |
314 | 314 | |
315 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
315 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
316 | 316 | |
317 | 317 | return $app['twig']->render('complete.twig', array( |
318 | 318 | 'admin_url' => $adminUrl, |
@@ -332,17 +332,17 @@ discard block |
||
332 | 332 | { |
333 | 333 | foreach ($this->required_modules as $module) { |
334 | 334 | if (!extension_loaded($module)) { |
335 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
335 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
339 | 339 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
340 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
340 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | foreach ($this->recommended_module as $module) { |
344 | 344 | if (!extension_loaded($module)) { |
345 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
345 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if (!function_exists('apache_get_modules')) { |
361 | 361 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
362 | 362 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
363 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
363 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
364 | 364 | } |
365 | 365 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
366 | 366 | // iis |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | |
372 | 372 | private function setPDO() |
373 | 373 | { |
374 | - $config_file = $this->config_path . '/database.yml'; |
|
374 | + $config_file = $this->config_path.'/database.yml'; |
|
375 | 375 | $config = Yaml::parse(file_get_contents($config_file)); |
376 | 376 | |
377 | 377 | try { |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | */ |
407 | 407 | private function getEntityManager() |
408 | 408 | { |
409 | - $config_file = $this->config_path . '/database.yml'; |
|
409 | + $config_file = $this->config_path.'/database.yml'; |
|
410 | 410 | $database = Yaml::parse(file_get_contents($config_file)); |
411 | 411 | |
412 | 412 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -414,15 +414,15 @@ discard block |
||
414 | 414 | )); |
415 | 415 | |
416 | 416 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
417 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
417 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
418 | 418 | 'orm.em.options' => array( |
419 | 419 | 'mappings' => array( |
420 | 420 | array( |
421 | 421 | 'type' => 'yml', |
422 | 422 | 'namespace' => 'Eccube\Entity', |
423 | 423 | 'path' => array( |
424 | - __DIR__ . '/../../Resource/doctrine', |
|
425 | - __DIR__ . '/../../Resource/doctrine/master', |
|
424 | + __DIR__.'/../../Resource/doctrine', |
|
425 | + __DIR__.'/../../Resource/doctrine/master', |
|
426 | 426 | ), |
427 | 427 | ), |
428 | 428 | |
@@ -450,11 +450,11 @@ discard block |
||
450 | 450 | { |
451 | 451 | $this->resetNatTimer(); |
452 | 452 | |
453 | - $config_file = $this->config_path . '/database.yml'; |
|
453 | + $config_file = $this->config_path.'/database.yml'; |
|
454 | 454 | $database = Yaml::parse(file_get_contents($config_file)); |
455 | 455 | $config['database'] = $database['database']; |
456 | 456 | |
457 | - $config_file = $this->config_path . '/config.yml'; |
|
457 | + $config_file = $this->config_path.'/config.yml'; |
|
458 | 458 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
459 | 459 | $config['config'] = $baseConfig; |
460 | 460 | |
@@ -510,11 +510,11 @@ discard block |
||
510 | 510 | { |
511 | 511 | $this->resetNatTimer(); |
512 | 512 | |
513 | - $config_file = $this->config_path . '/database.yml'; |
|
513 | + $config_file = $this->config_path.'/database.yml'; |
|
514 | 514 | $database = Yaml::parse(file_get_contents($config_file)); |
515 | 515 | $config['database'] = $database['database']; |
516 | 516 | |
517 | - $config_file = $this->config_path . '/config.yml'; |
|
517 | + $config_file = $this->config_path.'/config.yml'; |
|
518 | 518 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
519 | 519 | $config['config'] = $baseConfig; |
520 | 520 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | $config = new Configuration($app['db']); |
580 | 580 | $config->setMigrationsNamespace('DoctrineMigrations'); |
581 | 581 | |
582 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
582 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
583 | 583 | $config->setMigrationsDirectory($migrationDir); |
584 | 584 | $config->registerMigrationsFromDirectory($migrationDir); |
585 | 585 | |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | private function getProtectedDirs() |
611 | 611 | { |
612 | 612 | $protectedDirs = array(); |
613 | - $base = __DIR__ . '/../../../..'; |
|
613 | + $base = __DIR__.'/../../../..'; |
|
614 | 614 | $dirs = array( |
615 | 615 | '/html', |
616 | 616 | '/app', |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | ); |
624 | 624 | |
625 | 625 | foreach ($dirs as $dir) { |
626 | - if (!is_writable($base . $dir)) { |
|
626 | + if (!is_writable($base.$dir)) { |
|
627 | 627 | $protectedDirs[] = $dir; |
628 | 628 | } |
629 | 629 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | private function createConfigYamlFile($data, $auth = true) |
635 | 635 | { |
636 | 636 | $fs = new Filesystem(); |
637 | - $config_file = $this->config_path . '/config.yml'; |
|
637 | + $config_file = $this->config_path.'/config.yml'; |
|
638 | 638 | |
639 | 639 | if ($fs->exists($config_file)) { |
640 | 640 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | $content = str_replace( |
666 | 666 | $target, |
667 | 667 | $replace, |
668 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
668 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
669 | 669 | ); |
670 | 670 | $fs->dumpFile($config_file, $content); |
671 | 671 | |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | |
680 | 680 | private function addInstallStatus() |
681 | 681 | { |
682 | - $config_file = $this->config_path . '/config.yml'; |
|
682 | + $config_file = $this->config_path.'/config.yml'; |
|
683 | 683 | $config = Yaml::parse(file_get_contents($config_file)); |
684 | 684 | $config['eccube_install'] = 1; |
685 | 685 | $yml = Yaml::dump($config); |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | private function createDatabaseYamlFile($data) |
692 | 692 | { |
693 | 693 | $fs = new Filesystem(); |
694 | - $config_file = $this->config_path . '/database.yml'; |
|
694 | + $config_file = $this->config_path.'/database.yml'; |
|
695 | 695 | if ($fs->exists($config_file)) { |
696 | 696 | $fs->remove($config_file); |
697 | 697 | } |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $content = str_replace( |
726 | 726 | $target, |
727 | 727 | $replace, |
728 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
728 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
729 | 729 | ); |
730 | 730 | |
731 | 731 | } else { |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | private function createMailYamlFile($data) |
745 | 745 | { |
746 | 746 | $fs = new Filesystem(); |
747 | - $config_file = $this->config_path . '/mail.yml'; |
|
747 | + $config_file = $this->config_path.'/mail.yml'; |
|
748 | 748 | if ($fs->exists($config_file)) { |
749 | 749 | $fs->remove($config_file); |
750 | 750 | } |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | $content = str_replace( |
762 | 762 | $target, |
763 | 763 | $replace, |
764 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
764 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
765 | 765 | ); |
766 | 766 | $fs->dumpFile($config_file, $content); |
767 | 767 | |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | private function createPathYamlFile($data, Request $request) |
772 | 772 | { |
773 | 773 | $fs = new Filesystem(); |
774 | - $config_file = $this->config_path . '/path.yml'; |
|
774 | + $config_file = $this->config_path.'/path.yml'; |
|
775 | 775 | if ($fs->exists($config_file)) { |
776 | 776 | $fs->remove($config_file); |
777 | 777 | } |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | $ADMIN_ROUTE = $data['admin_dir']; |
780 | 780 | $TEMPLATE_CODE = 'default'; |
781 | 781 | $USER_DATA_ROUTE = 'user_data'; |
782 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
782 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
783 | 783 | $ROOT_URLPATH = $request->getBasePath(); |
784 | 784 | |
785 | 785 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}'); |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $content = str_replace( |
790 | 790 | $target, |
791 | 791 | $replace, |
792 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
792 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
793 | 793 | ); |
794 | 794 | $fs->dumpFile($config_file, $content); |
795 | 795 | |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | |
799 | 799 | private function sendAppData($params) |
800 | 800 | { |
801 | - $config_file = $this->config_path . '/database.yml'; |
|
801 | + $config_file = $this->config_path.'/database.yml'; |
|
802 | 802 | $db_config = Yaml::parse(file_get_contents($config_file)); |
803 | 803 | |
804 | 804 | $this->setPDO(); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | } |
811 | 811 | |
812 | 812 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
813 | - $db_ver = 'MySQL:' . $version; |
|
813 | + $db_ver = 'MySQL:'.$version; |
|
814 | 814 | } else { |
815 | 815 | $db_ver = $version; |
816 | 816 | } |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | |
829 | 829 | $header = array( |
830 | 830 | 'Content-Type: application/x-www-form-urlencoded', |
831 | - 'Content-Length: ' . strlen($data), |
|
831 | + 'Content-Length: '.strlen($data), |
|
832 | 832 | ); |
833 | 833 | $context = stream_context_create( |
834 | 834 | array( |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | new Assert\Callback(array($this, 'validate')), |
97 | 97 | ), |
98 | 98 | )) |
99 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
99 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
100 | 100 | $form = $event->getForm(); |
101 | 101 | $data = $form->getData(); |
102 | 102 | try { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
122 | 122 | $conn->connect(); |
123 | 123 | } catch (\Exception $e) { |
124 | - $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage())); |
|
124 | + $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage())); |
|
125 | 125 | } |
126 | 126 | }); |
127 | 127 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function validate($data, ExecutionContext $context, $param = null) |
138 | 138 | { |
139 | 139 | $parameters = $this->app['request']->get('install_step4'); |
140 | - if ($parameters['database'] != 'pdo_sqlite'){ |
|
140 | + if ($parameters['database'] != 'pdo_sqlite') { |
|
141 | 141 | $context->validateValue($data, array( |
142 | 142 | new Assert\NotBlank() |
143 | 143 | )); |
@@ -119,7 +119,7 @@ |
||
119 | 119 | public function checkPluginArchiveContent($dir) |
120 | 120 | { |
121 | 121 | try { |
122 | - $meta = $this->readYml($dir . '/config.yml'); |
|
122 | + $meta = $this->readYml($dir.'/config.yml'); |
|
123 | 123 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
124 | 124 | $this->app['monolog']->warning($e->getMessage()); |
125 | 125 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | { |
308 | 308 | $config = $this->config; |
309 | 309 | |
310 | - return function ($value) use ($config) { |
|
310 | + return function($value) use ($config) { |
|
311 | 311 | return mb_convert_encoding( |
312 | 312 | (string) $value, $config['csv_export_encoding'], 'UTF-8' |
313 | 313 | ); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | if ($Conditions instanceof ArrayCollection) { |
432 | 432 | $Conditions = new ArrayCollection( |
433 | 433 | array_map( |
434 | - function ($Entity) use ($em) { |
|
434 | + function($Entity) use ($em) { |
|
435 | 435 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
436 | 436 | }, $Conditions->toArray() |
437 | 437 | ) |
@@ -20,32 +20,32 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function addSuccess($message, $namespace = 'front') |
22 | 22 | { |
23 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message); |
|
23 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | public function addError($message, $namespace = 'front') |
27 | 27 | { |
28 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message); |
|
28 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function addDanger($message, $namespace = 'front') |
32 | 32 | { |
33 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message); |
|
33 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function addWarning($message, $namespace = 'front') |
37 | 37 | { |
38 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message); |
|
38 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | public function addInfo($message, $namespace = 'front') |
42 | 42 | { |
43 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message); |
|
43 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function addRequestError($message, $namespace = 'front') |
47 | 47 | { |
48 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message); |
|
48 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function clearMessage() |
@@ -230,14 +230,14 @@ discard block |
||
230 | 230 | $eventName = $view; |
231 | 231 | if ($this->isAdminRequest()) { |
232 | 232 | // 管理画面の場合、event名に「admin.」を付ける |
233 | - $eventName = 'admin.' . $view; |
|
233 | + $eventName = 'admin.'.$view; |
|
234 | 234 | } |
235 | - $this['monolog']->debug('Template Event Name : ' . $eventName); |
|
235 | + $this['monolog']->debug('Template Event Name : '.$eventName); |
|
236 | 236 | |
237 | 237 | $this['eccube.event.dispatcher']->dispatch($eventName, $event); |
238 | 238 | |
239 | 239 | if ($response instanceof StreamedResponse) { |
240 | - $response->setCallback(function () use ($twig, $view, $parameters) { |
|
240 | + $response->setCallback(function() use ($twig, $view, $parameters) { |
|
241 | 241 | $twig->display($view, $parameters); |
242 | 242 | }); |
243 | 243 | } else { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | foreach ($images as $img) { |
178 | 178 | foreach ($img as $image) { |
179 | 179 | $extension = $image->getClientOriginalExtension(); |
180 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
180 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
181 | 181 | $image->move($app['config']['image_temp_realdir'], $filename); |
182 | 182 | $files[] = $filename; |
183 | 183 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_PRODUCT_EDIT_INITIALIZE, $event); |
240 | 240 | |
241 | 241 | if (!$has_class) { |
242 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
242 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
243 | 243 | $form['class']->setData($ProductClass); |
244 | 244 | } |
245 | 245 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $app['orm.em']->persist($ProductImage); |
338 | 338 | |
339 | 339 | // 移動 |
340 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
340 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
341 | 341 | $file->move($app['config']['image_save_realdir']); |
342 | 342 | } |
343 | 343 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | // 削除 |
359 | 359 | $fs = new Filesystem(); |
360 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
360 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
361 | 361 | } |
362 | 362 | $app['orm.em']->persist($Product); |
363 | 363 | $app['orm.em']->flush(); |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | foreach ($deleteImages as $deleteImage) { |
464 | 464 | try { |
465 | 465 | $fs = new Filesystem(); |
466 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
466 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
467 | 467 | } catch (\Exception $e) { |
468 | 468 | // エラーが発生しても無視する |
469 | 469 | } |
@@ -527,10 +527,10 @@ discard block |
||
527 | 527 | |
528 | 528 | // 画像ファイルを新規作成 |
529 | 529 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
530 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
530 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
531 | 531 | try { |
532 | 532 | $fs = new Filesystem(); |
533 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
533 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
534 | 534 | } catch (\Exception $e) { |
535 | 535 | // エラーが発生しても無視する |
536 | 536 | } |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $em->getConfiguration()->setSQLLogger(null); |
586 | 586 | |
587 | 587 | $response = new StreamedResponse(); |
588 | - $response->setCallback(function () use ($app, $request) { |
|
588 | + $response->setCallback(function() use ($app, $request) { |
|
589 | 589 | |
590 | 590 | // CSV種別を元に初期化. |
591 | 591 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | |
610 | 610 | // データ行の出力. |
611 | 611 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
612 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
612 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
613 | 613 | |
614 | 614 | $Csvs = $csvService->getCsvs(); |
615 | 615 | |
@@ -641,9 +641,9 @@ discard block |
||
641 | 641 | }); |
642 | 642 | |
643 | 643 | $now = new \DateTime(); |
644 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
644 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
645 | 645 | $response->headers->set('Content-Type', 'application/octet-stream'); |
646 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
646 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
647 | 647 | $response->send(); |
648 | 648 | |
649 | 649 | return $response; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | foreach ($finder as $dir) { |
455 | 455 | if (file_exists($dir->getRealPath().'/config.yml')) { |
456 | 456 | $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml')); |
457 | - }else{ |
|
457 | + } else { |
|
458 | 458 | $error = 'Application::initDoctrine : config.yamlがみつかりません'.$dir->getRealPath(); |
459 | 459 | $this->log($error, array(), Logger::WARNING); |
460 | 460 | continue; |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | //config.ymlのないディレクトリは無視する |
670 | 670 | try { |
671 | 671 | $this['eccube.service.plugin']->checkPluginArchiveContent($dir->getRealPath()); |
672 | - } catch(\Eccube\Exception\PluginException $e) { |
|
672 | + } catch (\Eccube\Exception\PluginException $e) { |
|
673 | 673 | $this['monolog']->warning($e->getMessage()); |
674 | 674 | continue; |
675 | 675 | } |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | foreach ($config['service'] as $service) { |
722 | 722 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
723 | 723 | if (!class_exists($class)) { |
724 | - $this['monolog']->warning('該当クラスが見つかりません:' . $class); |
|
724 | + $this['monolog']->warning('該当クラスが見つかりません:'.$class); |
|
725 | 725 | continue; |
726 | 726 | } |
727 | 727 | $this->register(new $class($this)); |