| @@ -329,6 +329,9 @@ | ||
| 329 | 329 | flush(); | 
| 330 | 330 | } | 
| 331 | 331 | |
| 332 | + /** | |
| 333 | + * @param InstallApplication $app | |
| 334 | + */ | |
| 332 | 335 | private function checkModules($app) | 
| 333 | 336 |      { | 
| 334 | 337 |          foreach ($this->required_modules as $module) { | 
| @@ -56,9 +56,9 @@ discard block | ||
| 56 | 56 | |
| 57 | 57 | public function __construct() | 
| 58 | 58 |      { | 
| 59 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; | |
| 60 | - $this->dist_path = __DIR__ . '/../../Resource/config'; | |
| 61 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; | |
| 59 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; | |
| 60 | + $this->dist_path = __DIR__.'/../../Resource/config'; | |
| 61 | + $this->cache_path = __DIR__.'/../../../../app/cache'; | |
| 62 | 62 | } | 
| 63 | 63 | |
| 64 | 64 | private function isValid(Request $request, Form $form) | 
| @@ -108,7 +108,7 @@ discard block | ||
| 108 | 108 | |
| 109 | 109 |          return $app['twig']->render('step1.twig', array( | 
| 110 | 110 | 'form' => $form->createView(), | 
| 111 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 111 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 112 | 112 | )); | 
| 113 | 113 | } | 
| 114 | 114 | |
| @@ -131,7 +131,7 @@ discard block | ||
| 131 | 131 | |
| 132 | 132 |          return $app['twig']->render('step2.twig', array( | 
| 133 | 133 | 'protectedDirs' => $protectedDirs, | 
| 134 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 134 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 135 | 135 | )); | 
| 136 | 136 | } | 
| 137 | 137 | |
| @@ -145,7 +145,7 @@ discard block | ||
| 145 | 145 | |
| 146 | 146 |          if (empty($sessionData['shop_name'])) { | 
| 147 | 147 | |
| 148 | - $config_file = $this->config_path . '/config.yml'; | |
| 148 | + $config_file = $this->config_path.'/config.yml'; | |
| 149 | 149 | $fs = new Filesystem(); | 
| 150 | 150 | |
| 151 | 151 |              if ($fs->exists($config_file)) { | 
| @@ -159,11 +159,11 @@ discard block | ||
| 159 | 159 | } | 
| 160 | 160 | |
| 161 | 161 | // セキュリティの設定 | 
| 162 | - $config_file = $this->config_path . '/path.yml'; | |
| 162 | + $config_file = $this->config_path.'/path.yml'; | |
| 163 | 163 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 164 | 164 | $sessionData['admin_dir'] = $config['admin_route']; | 
| 165 | 165 | |
| 166 | - $config_file = $this->config_path . '/config.yml'; | |
| 166 | + $config_file = $this->config_path.'/config.yml'; | |
| 167 | 167 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 168 | 168 | |
| 169 | 169 | $allowHost = $config['admin_allow_host']; | 
| @@ -173,7 +173,7 @@ discard block | ||
| 173 | 173 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; | 
| 174 | 174 | |
| 175 | 175 | // メール設定 | 
| 176 | - $config_file = $this->config_path . '/mail.yml'; | |
| 176 | + $config_file = $this->config_path.'/mail.yml'; | |
| 177 | 177 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 178 | 178 | $mail = $config['mail']; | 
| 179 | 179 | $sessionData['mail_backend'] = $mail['transport']; | 
| @@ -196,7 +196,7 @@ discard block | ||
| 196 | 196 | |
| 197 | 197 |          return $app['twig']->render('step3.twig', array( | 
| 198 | 198 | 'form' => $form->createView(), | 
| 199 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 199 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 200 | 200 | )); | 
| 201 | 201 | } | 
| 202 | 202 | |
| @@ -211,7 +211,7 @@ discard block | ||
| 211 | 211 | |
| 212 | 212 |          if (empty($sessionData['database'])) { | 
| 213 | 213 | |
| 214 | - $config_file = $this->config_path . '/database.yml'; | |
| 214 | + $config_file = $this->config_path.'/database.yml'; | |
| 215 | 215 | $fs = new Filesystem(); | 
| 216 | 216 | |
| 217 | 217 |              if ($fs->exists($config_file)) { | 
| @@ -239,7 +239,7 @@ discard block | ||
| 239 | 239 | |
| 240 | 240 |          return $app['twig']->render('step4.twig', array( | 
| 241 | 241 | 'form' => $form->createView(), | 
| 242 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 242 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 243 | 243 | )); | 
| 244 | 244 | } | 
| 245 | 245 | |
| @@ -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 | |
| @@ -300,24 +300,24 @@ discard block | ||
| 300 | 300 | |
| 301 | 301 |          return $app['twig']->render('step5.twig', array( | 
| 302 | 302 | 'form' => $form->createView(), | 
| 303 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 303 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 304 | 304 | )); | 
| 305 | 305 | } | 
| 306 | 306 | |
| 307 | 307 | // インストール完了 | 
| 308 | 308 | public function complete(InstallApplication $app, Request $request) | 
| 309 | 309 |      { | 
| 310 | - $config_file = $this->config_path . '/path.yml'; | |
| 310 | + $config_file = $this->config_path.'/path.yml'; | |
| 311 | 311 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 312 | 312 | |
| 313 | 313 | $host = $request->getSchemeAndHttpHost(); | 
| 314 | 314 | $basePath = $request->getBasePath(); | 
| 315 | 315 | |
| 316 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; | |
| 316 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; | |
| 317 | 317 | |
| 318 | 318 |          return $app['twig']->render('complete.twig', array( | 
| 319 | 319 | 'admin_url' => $adminUrl, | 
| 320 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 320 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 321 | 321 | )); | 
| 322 | 322 | } | 
| 323 | 323 | |
| @@ -333,12 +333,12 @@ discard block | ||
| 333 | 333 |      { | 
| 334 | 334 |          foreach ($this->required_modules as $module) { | 
| 335 | 335 |              if (!extension_loaded($module)) { | 
| 336 | -                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); | |
| 336 | +                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); | |
| 337 | 337 | } | 
| 338 | 338 | } | 
| 339 | 339 | |
| 340 | 340 |          if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { | 
| 341 | -            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); | |
| 341 | +            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); | |
| 342 | 342 | } | 
| 343 | 343 | |
| 344 | 344 |          foreach ($this->recommended_module as $module) { | 
| @@ -366,7 +366,7 @@ discard block | ||
| 366 | 366 |              if (!function_exists('apache_get_modules')) { | 
| 367 | 367 |                  $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); | 
| 368 | 368 |              } elseif (!in_array('mod_rewrite', apache_get_modules())) { | 
| 369 | -                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); | |
| 369 | +                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); | |
| 370 | 370 | } | 
| 371 | 371 |          } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { | 
| 372 | 372 | // iis | 
| @@ -377,7 +377,7 @@ discard block | ||
| 377 | 377 | |
| 378 | 378 | private function setPDO() | 
| 379 | 379 |      { | 
| 380 | - $config_file = $this->config_path . '/database.yml'; | |
| 380 | + $config_file = $this->config_path.'/database.yml'; | |
| 381 | 381 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 382 | 382 | |
| 383 | 383 |          try { | 
| @@ -411,7 +411,7 @@ discard block | ||
| 411 | 411 | */ | 
| 412 | 412 | private function getEntityManager() | 
| 413 | 413 |      { | 
| 414 | - $config_file = $this->config_path . '/database.yml'; | |
| 414 | + $config_file = $this->config_path.'/database.yml'; | |
| 415 | 415 | $database = Yaml::parse(file_get_contents($config_file)); | 
| 416 | 416 | |
| 417 | 417 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( | 
| @@ -419,15 +419,15 @@ discard block | ||
| 419 | 419 | )); | 
| 420 | 420 | |
| 421 | 421 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( | 
| 422 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', | |
| 422 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', | |
| 423 | 423 | 'orm.em.options' => array( | 
| 424 | 424 | 'mappings' => array( | 
| 425 | 425 | array( | 
| 426 | 426 | 'type' => 'yml', | 
| 427 | 427 | 'namespace' => 'Eccube\Entity', | 
| 428 | 428 | 'path' => array( | 
| 429 | - __DIR__ . '/../../Resource/doctrine', | |
| 430 | - __DIR__ . '/../../Resource/doctrine/master', | |
| 429 | + __DIR__.'/../../Resource/doctrine', | |
| 430 | + __DIR__.'/../../Resource/doctrine/master', | |
| 431 | 431 | ), | 
| 432 | 432 | ), | 
| 433 | 433 | ), | 
| @@ -454,11 +454,11 @@ discard block | ||
| 454 | 454 |      { | 
| 455 | 455 | $this->resetNatTimer(); | 
| 456 | 456 | |
| 457 | - $config_file = $this->config_path . '/database.yml'; | |
| 457 | + $config_file = $this->config_path.'/database.yml'; | |
| 458 | 458 | $database = Yaml::parse(file_get_contents($config_file)); | 
| 459 | 459 | $config['database'] = $database['database']; | 
| 460 | 460 | |
| 461 | - $config_file = $this->config_path . '/config.yml'; | |
| 461 | + $config_file = $this->config_path.'/config.yml'; | |
| 462 | 462 | $baseConfig = Yaml::parse(file_get_contents($config_file)); | 
| 463 | 463 | $config['config'] = $baseConfig; | 
| 464 | 464 | |
| @@ -514,11 +514,11 @@ discard block | ||
| 514 | 514 |      { | 
| 515 | 515 | $this->resetNatTimer(); | 
| 516 | 516 | |
| 517 | - $config_file = $this->config_path . '/database.yml'; | |
| 517 | + $config_file = $this->config_path.'/database.yml'; | |
| 518 | 518 | $database = Yaml::parse(file_get_contents($config_file)); | 
| 519 | 519 | $config['database'] = $database['database']; | 
| 520 | 520 | |
| 521 | - $config_file = $this->config_path . '/config.yml'; | |
| 521 | + $config_file = $this->config_path.'/config.yml'; | |
| 522 | 522 | $baseConfig = Yaml::parse(file_get_contents($config_file)); | 
| 523 | 523 | $config['config'] = $baseConfig; | 
| 524 | 524 | |
| @@ -581,7 +581,7 @@ discard block | ||
| 581 | 581 | $config = new Configuration($app['db']); | 
| 582 | 582 |          $config->setMigrationsNamespace('DoctrineMigrations'); | 
| 583 | 583 | |
| 584 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; | |
| 584 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; | |
| 585 | 585 | $config->setMigrationsDirectory($migrationDir); | 
| 586 | 586 | $config->registerMigrationsFromDirectory($migrationDir); | 
| 587 | 587 | |
| @@ -613,7 +613,7 @@ discard block | ||
| 613 | 613 | private function getProtectedDirs() | 
| 614 | 614 |      { | 
| 615 | 615 | $protectedDirs = array(); | 
| 616 | - $base = __DIR__ . '/../../../..'; | |
| 616 | + $base = __DIR__.'/../../../..'; | |
| 617 | 617 | $dirs = array( | 
| 618 | 618 | '/html', | 
| 619 | 619 | '/app', | 
| @@ -626,7 +626,7 @@ discard block | ||
| 626 | 626 | ); | 
| 627 | 627 | |
| 628 | 628 |          foreach ($dirs as $dir) { | 
| 629 | -            if (!is_writable($base . $dir)) { | |
| 629 | +            if (!is_writable($base.$dir)) { | |
| 630 | 630 | $protectedDirs[] = $dir; | 
| 631 | 631 | } | 
| 632 | 632 | } | 
| @@ -637,7 +637,7 @@ discard block | ||
| 637 | 637 | private function createConfigYamlFile($data, $auth = true) | 
| 638 | 638 |      { | 
| 639 | 639 | $fs = new Filesystem(); | 
| 640 | - $config_file = $this->config_path . '/config.yml'; | |
| 640 | + $config_file = $this->config_path.'/config.yml'; | |
| 641 | 641 | |
| 642 | 642 |          if ($fs->exists($config_file)) { | 
| 643 | 643 | $config = Yaml::parse(file_get_contents($config_file)); | 
| @@ -666,7 +666,7 @@ discard block | ||
| 666 | 666 | |
| 667 | 667 | $fs = new Filesystem(); | 
| 668 | 668 | $content = str_replace( | 
| 669 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') | |
| 669 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') | |
| 670 | 670 | ); | 
| 671 | 671 | $fs->dumpFile($config_file, $content); | 
| 672 | 672 | |
| @@ -680,7 +680,7 @@ discard block | ||
| 680 | 680 | |
| 681 | 681 | private function addInstallStatus() | 
| 682 | 682 |      { | 
| 683 | - $config_file = $this->config_path . '/config.yml'; | |
| 683 | + $config_file = $this->config_path.'/config.yml'; | |
| 684 | 684 | $config = Yaml::parse(file_get_contents($config_file)); | 
| 685 | 685 | $config['eccube_install'] = 1; | 
| 686 | 686 | $yml = Yaml::dump($config); | 
| @@ -692,7 +692,7 @@ discard block | ||
| 692 | 692 | private function createDatabaseYamlFile($data) | 
| 693 | 693 |      { | 
| 694 | 694 | $fs = new Filesystem(); | 
| 695 | - $config_file = $this->config_path . '/database.yml'; | |
| 695 | + $config_file = $this->config_path.'/database.yml'; | |
| 696 | 696 |          if ($fs->exists($config_file)) { | 
| 697 | 697 | $fs->remove($config_file); | 
| 698 | 698 | } | 
| @@ -725,14 +725,14 @@ discard block | ||
| 725 | 725 | |
| 726 | 726 | $fs = new Filesystem(); | 
| 727 | 727 | $content = str_replace( | 
| 728 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') | |
| 728 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') | |
| 729 | 729 | ); | 
| 730 | 730 |          } else { | 
| 731 | 731 | $content = Yaml::dump( | 
| 732 | 732 | array( | 
| 733 | 733 | 'database' => array( | 
| 734 | 734 | 'driver' => 'pdo_sqlite', | 
| 735 | - 'path' => realpath($this->config_path . '/eccube.db') | |
| 735 | + 'path' => realpath($this->config_path.'/eccube.db') | |
| 736 | 736 | ) | 
| 737 | 737 | ) | 
| 738 | 738 | ); | 
| @@ -745,7 +745,7 @@ discard block | ||
| 745 | 745 | private function createMailYamlFile($data) | 
| 746 | 746 |      { | 
| 747 | 747 | $fs = new Filesystem(); | 
| 748 | - $config_file = $this->config_path . '/mail.yml'; | |
| 748 | + $config_file = $this->config_path.'/mail.yml'; | |
| 749 | 749 |          if ($fs->exists($config_file)) { | 
| 750 | 750 | $fs->remove($config_file); | 
| 751 | 751 | } | 
| @@ -760,7 +760,7 @@ discard block | ||
| 760 | 760 | |
| 761 | 761 | $fs = new Filesystem(); | 
| 762 | 762 | $content = str_replace( | 
| 763 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') | |
| 763 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') | |
| 764 | 764 | ); | 
| 765 | 765 | $fs->dumpFile($config_file, $content); | 
| 766 | 766 | |
| @@ -770,7 +770,7 @@ discard block | ||
| 770 | 770 | private function createPathYamlFile($data, Request $request) | 
| 771 | 771 |      { | 
| 772 | 772 | $fs = new Filesystem(); | 
| 773 | - $config_file = $this->config_path . '/path.yml'; | |
| 773 | + $config_file = $this->config_path.'/path.yml'; | |
| 774 | 774 |          if ($fs->exists($config_file)) { | 
| 775 | 775 | $fs->remove($config_file); | 
| 776 | 776 | } | 
| @@ -778,16 +778,16 @@ discard block | ||
| 778 | 778 | $ADMIN_ROUTE = $data['admin_dir']; | 
| 779 | 779 | $TEMPLATE_CODE = 'default'; | 
| 780 | 780 | $USER_DATA_ROUTE = 'user_data'; | 
| 781 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); | |
| 781 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); | |
| 782 | 782 | $ROOT_URLPATH = $request->getBasePath(); | 
| 783 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; | |
| 783 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; | |
| 784 | 784 | |
| 785 | 785 |          $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); | 
| 786 | 786 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); | 
| 787 | 787 | |
| 788 | 788 | $fs = new Filesystem(); | 
| 789 | 789 | $content = str_replace( | 
| 790 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') | |
| 790 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') | |
| 791 | 791 | ); | 
| 792 | 792 | $fs->dumpFile($config_file, $content); | 
| 793 | 793 | |
| @@ -796,7 +796,7 @@ discard block | ||
| 796 | 796 | |
| 797 | 797 | private function sendAppData($params) | 
| 798 | 798 |      { | 
| 799 | - $config_file = $this->config_path . '/database.yml'; | |
| 799 | + $config_file = $this->config_path.'/database.yml'; | |
| 800 | 800 | $db_config = Yaml::parse(file_get_contents($config_file)); | 
| 801 | 801 | |
| 802 | 802 | $this->setPDO(); | 
| @@ -808,7 +808,7 @@ discard block | ||
| 808 | 808 | } | 
| 809 | 809 | |
| 810 | 810 |          if ($db_config['database']['driver'] === 'pdo_mysql') { | 
| 811 | - $db_ver = 'MySQL:' . $version; | |
| 811 | + $db_ver = 'MySQL:'.$version; | |
| 812 | 812 |          } else { | 
| 813 | 813 | $db_ver = $version; | 
| 814 | 814 | } | 
| @@ -826,7 +826,7 @@ discard block | ||
| 826 | 826 | |
| 827 | 827 | $header = array( | 
| 828 | 828 | 'Content-Type: application/x-www-form-urlencoded', | 
| 829 | - 'Content-Length: ' . strlen($data), | |
| 829 | + 'Content-Length: '.strlen($data), | |
| 830 | 830 | ); | 
| 831 | 831 | $context = stream_context_create( | 
| 832 | 832 | array( | 
| @@ -853,7 +853,7 @@ discard block | ||
| 853 | 853 | public function migration(InstallApplication $app, Request $request) | 
| 854 | 854 |      { | 
| 855 | 855 |          return $app['twig']->render('migration.twig', array( | 
| 856 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 856 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 857 | 857 | )); | 
| 858 | 858 | } | 
| 859 | 859 | |
| @@ -882,7 +882,7 @@ discard block | ||
| 882 | 882 |              return $app['twig']->render('migration_plugin.twig', array( | 
| 883 | 883 | 'Plugins' => $Plugins, | 
| 884 | 884 | 'version' => Constant::VERSION, | 
| 885 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 885 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 886 | 886 | )); | 
| 887 | 887 | } | 
| 888 | 888 | } | 
| @@ -905,7 +905,7 @@ discard block | ||
| 905 | 905 | \Eccube\Util\Cache::clear($config_app, true); | 
| 906 | 906 | |
| 907 | 907 |          return $app['twig']->render('migration_end.twig', array( | 
| 908 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', | |
| 908 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', | |
| 909 | 909 | )); | 
| 910 | 910 | } | 
| 911 | 911 | } | 
| @@ -146,7 +146,7 @@ discard block | ||
| 146 | 146 | $this->register(new MobileDetectServiceProvider()); | 
| 147 | 147 | |
| 148 | 148 | $app = $this; | 
| 149 | -        $this->error(function (\Exception $e, $code) use ($app) { | |
| 149 | +        $this->error(function(\Exception $e, $code) use ($app) { | |
| 150 | 150 |              if ($app['debug']) { | 
| 151 | 151 | return; | 
| 152 | 152 | } | 
| @@ -214,7 +214,7 @@ discard block | ||
| 214 | 214 | 'locale' => $this['config']['locale'], | 
| 215 | 215 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', | 
| 216 | 216 | )); | 
| 217 | -        $this['translator'] = $this->share($this->extend('translator', function ($translator, \Silex\Application $app) { | |
| 217 | +        $this['translator'] = $this->share($this->extend('translator', function($translator, \Silex\Application $app) { | |
| 218 | 218 |              $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); | 
| 219 | 219 | |
| 220 | 220 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; | 
| @@ -261,14 +261,14 @@ discard block | ||
| 261 | 261 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( | 
| 262 | 262 |              'twig.form.templates' => array('Form/form_layout.twig'), | 
| 263 | 263 | )); | 
| 264 | -        $this['twig'] = $this->share($this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { | |
| 264 | +        $this['twig'] = $this->share($this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { | |
| 265 | 265 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); | 
| 266 | 266 | $twig->addExtension(new \Twig_Extension_StringLoader()); | 
| 267 | 267 | |
| 268 | 268 | return $twig; | 
| 269 | 269 | })); | 
| 270 | 270 | |
| 271 | -        $this->before(function (Request $request, \Silex\Application $app) { | |
| 271 | +        $this->before(function(Request $request, \Silex\Application $app) { | |
| 272 | 272 | $app['admin'] = false; | 
| 273 | 273 | $app['front'] = false; | 
| 274 | 274 | $pathinfo = rawurldecode($request->getPathInfo()); | 
| @@ -279,7 +279,7 @@ discard block | ||
| 279 | 279 | } | 
| 280 | 280 | |
| 281 | 281 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. | 
| 282 | -            $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { | |
| 282 | +            $app['twig'] = $app->share($app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { | |
| 283 | 283 | $paths = array(); | 
| 284 | 284 | |
| 285 | 285 | // 互換性がないのでprofiler とproduction 時のcacheを分離する | 
| @@ -326,7 +326,7 @@ discard block | ||
| 326 | 326 | |
| 327 | 327 | // twigのグローバル変数を定義. | 
| 328 | 328 | $app = $this; | 
| 329 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { | |
| 329 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { | |
| 330 | 330 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, | 
| 331 | 331 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う | 
| 332 | 332 |              if (isset($app['twig_global_initialized']) && $app['twig_global_initialized'] === true) { | 
| @@ -392,7 +392,7 @@ discard block | ||
| 392 | 392 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) | 
| 393 | 393 |          if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { | 
| 394 | 394 |              if ($this['config']['mail']['charset_iso_2022_jp'] === true) { | 
| 395 | -                \Swift::init(function () { | |
| 395 | +                \Swift::init(function() { | |
| 396 | 396 | \Swift_DependencyContainer::getInstance() | 
| 397 | 397 |                          ->register('mime.qpheaderencoder') | 
| 398 | 398 |                          ->asAliasOf('mime.base64headerencoder'); | 
| @@ -572,19 +572,19 @@ discard block | ||
| 572 | 572 |              array('^/mypage', 'ROLE_USER', $channel), | 
| 573 | 573 | ); | 
| 574 | 574 | |
| 575 | -        $this['eccube.password_encoder'] = $this->share(function ($app) { | |
| 575 | +        $this['eccube.password_encoder'] = $this->share(function($app) { | |
| 576 | 576 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); | 
| 577 | 577 | }); | 
| 578 | -        $this['security.encoder_factory'] = $this->share(function ($app) { | |
| 578 | +        $this['security.encoder_factory'] = $this->share(function($app) { | |
| 579 | 579 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( | 
| 580 | 580 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], | 
| 581 | 581 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], | 
| 582 | 582 | )); | 
| 583 | 583 | }); | 
| 584 | -        $this['eccube.event_listner.security'] = $this->share(function ($app) { | |
| 584 | +        $this['eccube.event_listner.security'] = $this->share(function($app) { | |
| 585 | 585 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); | 
| 586 | 586 | }); | 
| 587 | -        $this['user'] = function ($app) { | |
| 587 | +        $this['user'] = function($app) { | |
| 588 | 588 | $token = $app['security']->getToken(); | 
| 589 | 589 | |
| 590 | 590 | return ($token !== null) ? $token->getUser() : null; | 
| @@ -595,17 +595,17 @@ discard block | ||
| 595 | 595 | |
| 596 | 596 | // Voterの設定 | 
| 597 | 597 | $app = $this; | 
| 598 | -        $this['authority_voter'] = $this->share(function ($app) { | |
| 598 | +        $this['authority_voter'] = $this->share(function($app) { | |
| 599 | 599 | return new \Eccube\Security\Voter\AuthorityVoter($app); | 
| 600 | 600 | }); | 
| 601 | 601 | |
| 602 | -        $app['security.voters'] = $app->extend('security.voters', function ($voters) use ($app) { | |
| 602 | +        $app['security.voters'] = $app->extend('security.voters', function($voters) use ($app) { | |
| 603 | 603 | $voters[] = $app['authority_voter']; | 
| 604 | 604 | |
| 605 | 605 | return $voters; | 
| 606 | 606 | }); | 
| 607 | 607 | |
| 608 | -        $this['security.access_manager'] = $this->share(function ($app) { | |
| 608 | +        $this['security.access_manager'] = $this->share(function($app) { | |
| 609 | 609 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); | 
| 610 | 610 | }); | 
| 611 | 611 | |
| @@ -629,14 +629,14 @@ discard block | ||
| 629 | 629 | public function initPluginEventDispatcher() | 
| 630 | 630 |      { | 
| 631 | 631 | // EventDispatcher | 
| 632 | -        $this['eccube.event.dispatcher'] = $this->share(function () { | |
| 632 | +        $this['eccube.event.dispatcher'] = $this->share(function() { | |
| 633 | 633 | return new EventDispatcher(); | 
| 634 | 634 | }); | 
| 635 | 635 | |
| 636 | 636 | $app = $this; | 
| 637 | 637 | |
| 638 | 638 | // hook point | 
| 639 | -        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { | |
| 639 | +        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { | |
| 640 | 640 |              if (!$event->isMasterRequest()) { | 
| 641 | 641 | return; | 
| 642 | 642 | } | 
| @@ -644,7 +644,7 @@ discard block | ||
| 644 | 644 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); | 
| 645 | 645 | }, self::EARLY_EVENT); | 
| 646 | 646 | |
| 647 | -        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { | |
| 647 | +        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { | |
| 648 | 648 |              if (!$event->isMasterRequest()) { | 
| 649 | 649 | return; | 
| 650 | 650 | } | 
| @@ -653,7 +653,7 @@ discard block | ||
| 653 | 653 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); | 
| 654 | 654 | }); | 
| 655 | 655 | |
| 656 | -        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { | |
| 656 | +        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { | |
| 657 | 657 |              if (!$event->isMasterRequest()) { | 
| 658 | 658 | return; | 
| 659 | 659 | } | 
| @@ -662,7 +662,7 @@ discard block | ||
| 662 | 662 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); | 
| 663 | 663 | }); | 
| 664 | 664 | |
| 665 | -        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { | |
| 665 | +        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { | |
| 666 | 666 |              if (!$event->isMasterRequest()) { | 
| 667 | 667 | return; | 
| 668 | 668 | } | 
| @@ -670,13 +670,13 @@ discard block | ||
| 670 | 670 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); | 
| 671 | 671 | }, self::LATE_EVENT); | 
| 672 | 672 | |
| 673 | -        $this->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) { | |
| 673 | +        $this->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) { | |
| 674 | 674 |              $route = $event->getRequest()->attributes->get('_route'); | 
| 675 | 675 | $hookpoint = "eccube.event.controller.$route.finish"; | 
| 676 | 676 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); | 
| 677 | 677 | }); | 
| 678 | 678 | |
| 679 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 679 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 680 | 680 |              if (!$event->isMasterRequest()) { | 
| 681 | 681 | return; | 
| 682 | 682 | } | 
| @@ -685,7 +685,7 @@ discard block | ||
| 685 | 685 | }); | 
| 686 | 686 | |
| 687 | 687 | // Request Event | 
| 688 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { | |
| 688 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { | |
| 689 | 689 | |
| 690 | 690 |              if (!$event->isMasterRequest()) { | 
| 691 | 691 | return; | 
| @@ -716,7 +716,7 @@ discard block | ||
| 716 | 716 | }, 30); // Routing(32)が解決しし, 認証判定(8)が実行される前のタイミング. | 
| 717 | 717 | |
| 718 | 718 | // Controller Event | 
| 719 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { | |
| 719 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { | |
| 720 | 720 | |
| 721 | 721 |              if (!$event->isMasterRequest()) { | 
| 722 | 722 | return; | 
| @@ -746,7 +746,7 @@ discard block | ||
| 746 | 746 | }); | 
| 747 | 747 | |
| 748 | 748 | // Response Event | 
| 749 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 749 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 750 | 750 |              if (!$event->isMasterRequest()) { | 
| 751 | 751 | return; | 
| 752 | 752 | } | 
| @@ -775,7 +775,7 @@ discard block | ||
| 775 | 775 | }); | 
| 776 | 776 | |
| 777 | 777 | // Exception Event | 
| 778 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { | |
| 778 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { | |
| 779 | 779 | |
| 780 | 780 |              if (!$event->isMasterRequest()) { | 
| 781 | 781 | return; | 
| @@ -805,7 +805,7 @@ discard block | ||
| 805 | 805 | }); | 
| 806 | 806 | |
| 807 | 807 | // Terminate Event | 
| 808 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { | |
| 808 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { | |
| 809 | 809 | |
| 810 | 810 |              $route = $event->getRequest()->attributes->get('_route'); | 
| 811 | 811 | |
| @@ -876,7 +876,7 @@ discard block | ||
| 876 | 876 | |
| 877 | 877 | // const | 
| 878 | 878 |              if (isset($config['const'])) { | 
| 879 | -                $this['config'] = $this->share($this->extend('config', function ($eccubeConfig) use ($config) { | |
| 879 | +                $this['config'] = $this->share($this->extend('config', function($eccubeConfig) use ($config) { | |
| 880 | 880 | $eccubeConfig[$config['code']] = array( | 
| 881 | 881 | 'const' => $config['const'], | 
| 882 | 882 | ); | 
| @@ -1079,7 +1079,7 @@ discard block | ||
| 1079 | 1079 | $app = $this; | 
| 1080 | 1080 | |
| 1081 | 1081 | // Response Event(http cache対応、event実行は一番遅く設定) | 
| 1082 | -        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 1082 | +        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { | |
| 1083 | 1083 | |
| 1084 | 1084 |              if (!$event->isMasterRequest()) { | 
| 1085 | 1085 | return; | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 |  { | 
| 68 | 68 | public function register(Application $app) | 
| 69 | 69 |      { | 
| 70 | -        $app['var_dumper.cloner'] = $app->share(function ($app) { | |
| 70 | +        $app['var_dumper.cloner'] = $app->share(function($app) { | |
| 71 | 71 | $cloner = new VarCloner(); | 
| 72 | 72 | |
| 73 | 73 |              if (isset($app['debug.max_items'])) { | 
| @@ -81,23 +81,23 @@ discard block | ||
| 81 | 81 | return $cloner; | 
| 82 | 82 | }); | 
| 83 | 83 | |
| 84 | -        $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function ($templates) { | |
| 84 | +        $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function($templates) { | |
| 85 | 85 |              return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig'))); | 
| 86 | 86 | })); | 
| 87 | 87 | |
| 88 | -        $app['data_collector.dump'] = $app->share(function ($app) { | |
| 88 | +        $app['data_collector.dump'] = $app->share(function($app) { | |
| 89 | 89 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format'], null, null, new HtmlDumper()); | 
| 90 | 90 | }); | 
| 91 | 91 | |
| 92 | -        $app['data_collectors'] = $app->share($app->extend('data_collectors', function ($collectors, $app) { | |
| 93 | -            $collectors['dump'] = $app->share(function ($app) { | |
| 92 | +        $app['data_collectors'] = $app->share($app->extend('data_collectors', function($collectors, $app) { | |
| 93 | +            $collectors['dump'] = $app->share(function($app) { | |
| 94 | 94 | return $app['data_collector.dump']; | 
| 95 | 95 | }); | 
| 96 | 96 | |
| 97 | 97 | return $collectors; | 
| 98 | 98 | })); | 
| 99 | 99 | |
| 100 | -        $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) { | |
| 100 | +        $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { | |
| 101 | 101 |              if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { | 
| 102 | 102 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); | 
| 103 | 103 | } | 
| @@ -105,13 +105,13 @@ discard block | ||
| 105 | 105 | return $twig; | 
| 106 | 106 | })); | 
| 107 | 107 | |
| 108 | -        $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) { | |
| 108 | +        $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function($loader, $app) { | |
| 109 | 109 | $loader->addPath($app['debug.templates_path'], 'Debug'); | 
| 110 | 110 | |
| 111 | 111 | return $loader; | 
| 112 | 112 | })); | 
| 113 | 113 | |
| 114 | -        $app['debug.templates_path'] = function () { | |
| 114 | +        $app['debug.templates_path'] = function() { | |
| 115 | 115 |              $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); | 
| 116 | 116 | |
| 117 | 117 | return dirname(dirname($r->getFileName())).'/Resources/views'; | 
| @@ -123,11 +123,11 @@ discard block | ||
| 123 | 123 | // This code is here to lazy load the dump stack. This default | 
| 124 | 124 | // configuration for CLI mode is overridden in HTTP mode on | 
| 125 | 125 | // 'kernel.request' event | 
| 126 | -        VarDumper::setHandler(function ($var) use ($app) { | |
| 126 | +        VarDumper::setHandler(function($var) use ($app) { | |
| 127 | 127 | $dumper = $app['data_collector.dump']; | 
| 128 | 128 | $cloner = $app['var_dumper.cloner']; | 
| 129 | 129 | |
| 130 | -            $handler = function ($var) use ($dumper, $cloner) { | |
| 130 | +            $handler = function($var) use ($dumper, $cloner) { | |
| 131 | 131 | $dumper->dump($cloner->cloneVar($var)); | 
| 132 | 132 | }; | 
| 133 | 133 | |
| @@ -39,7 +39,7 @@ discard block | ||
| 39 | 39 | private $error = null; | 
| 40 | 40 | private $encode = ''; | 
| 41 | 41 | |
| 42 | -    public function __construct(){ | |
| 42 | +    public function __construct() { | |
| 43 | 43 | $this->encode = self::UTF; | 
| 44 | 44 |          if ('\\' === DIRECTORY_SEPARATOR) { | 
| 45 | 45 | $this->encode = self::SJIS; | 
| @@ -84,7 +84,7 @@ discard block | ||
| 84 | 84 | $arrFileList = $this->getFileList($app, $nowDir); | 
| 85 | 85 | |
| 86 | 86 | $javascript = $this->getJsArrayList($tree); | 
| 87 | -        $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; | |
| 87 | +        $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; | |
| 88 | 88 | |
| 89 | 89 |          return $app->render('Content/file.twig', array( | 
| 90 | 90 | 'form' => $form->createView(), | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 |                  $nowDir = $this->checkDir($request->get('now_dir'), $topDir) | 
| 142 | 142 |                      ? $this->normalizePath($request->get('now_dir')) | 
| 143 | 143 | : $topDir; | 
| 144 | - $fs->mkdir($nowDir . '/' . $filename); | |
| 144 | + $fs->mkdir($nowDir.'/'.$filename); | |
| 145 | 145 | } | 
| 146 | 146 | } | 
| 147 | 147 | } | 
| @@ -219,7 +219,7 @@ discard block | ||
| 219 | 219 |      { | 
| 220 | 220 | $str = "arrTree = new Array();\n"; | 
| 221 | 221 |          foreach ($tree as $key => $val) { | 
| 222 | -            $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['rank'] . ','; | |
| 222 | +            $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['rank'].','; | |
| 223 | 223 |              if ($val['open']) { | 
| 224 | 224 | $str .= "true);\n"; | 
| 225 | 225 |              } else { | 
| @@ -270,7 +270,7 @@ discard block | ||
| 270 | 270 | private function getFileList($app, $nowDir) | 
| 271 | 271 |      { | 
| 272 | 272 | $topDir = $app['config']['user_data_realdir']; | 
| 273 | -        $filter = function (\SplFileInfo $file) use ($topDir) { | |
| 273 | +        $filter = function(\SplFileInfo $file) use ($topDir) { | |
| 274 | 274 | $acceptPath = realpath($topDir); | 
| 275 | 275 | $targetPath = $file->getRealPath(); | 
| 276 | 276 | return (strpos($targetPath, $acceptPath) === 0); | 
| @@ -100,14 +100,14 @@ discard block | ||
| 100 | 100 |          if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { | 
| 101 | 101 | $qb | 
| 102 | 102 |                  ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') | 
| 103 | -                ->setParameter('name', '%' . $searchData['name'] . '%'); | |
| 103 | +                ->setParameter('name', '%'.$searchData['name'].'%'); | |
| 104 | 104 | } | 
| 105 | 105 | |
| 106 | 106 | // kana | 
| 107 | 107 |          if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { | 
| 108 | 108 | $qb | 
| 109 | 109 |                  ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') | 
| 110 | -                ->setParameter('kana', '%' . $searchData['kana'] . '%'); | |
| 110 | +                ->setParameter('kana', '%'.$searchData['kana'].'%'); | |
| 111 | 111 | } | 
| 112 | 112 | |
| 113 | 113 | |
| @@ -244,7 +244,7 @@ discard block | ||
| 244 | 244 | $qb | 
| 245 | 245 |                  ->leftJoin('o.OrderDetails', 'od') | 
| 246 | 246 |                  ->andWhere('od.product_name LIKE :buy_product_name') | 
| 247 | -                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); | |
| 247 | +                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); | |
| 248 | 248 | } | 
| 249 | 249 | |
| 250 | 250 | // Order By | 
| @@ -270,13 +270,13 @@ discard block | ||
| 270 | 270 |                  ->setParameter('order_id_start', $searchData['order_id_start']); | 
| 271 | 271 | } | 
| 272 | 272 | // multi | 
| 273 | -        if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { | |
| 273 | +        if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) { | |
| 274 | 274 |              $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; | 
| 275 | 275 | $qb | 
| 276 | -                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . | |
| 276 | +                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '. | |
| 277 | 277 | 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') | 
| 278 | 278 |                  ->setParameter('multi', $multi) | 
| 279 | -                ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); | |
| 279 | +                ->setParameter('likemulti', '%'.$searchData['multi'].'%'); | |
| 280 | 280 | } | 
| 281 | 281 | |
| 282 | 282 | // order_id_end | 
| @@ -313,28 +313,28 @@ discard block | ||
| 313 | 313 |          if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { | 
| 314 | 314 | $qb | 
| 315 | 315 |                  ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') | 
| 316 | -                ->setParameter('name', '%' . $searchData['name'] . '%'); | |
| 316 | +                ->setParameter('name', '%'.$searchData['name'].'%'); | |
| 317 | 317 | } | 
| 318 | 318 | |
| 319 | 319 | // kana | 
| 320 | 320 |          if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { | 
| 321 | 321 | $qb | 
| 322 | 322 |                  ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') | 
| 323 | -                ->setParameter('kana', '%' . $searchData['kana'] . '%'); | |
| 323 | +                ->setParameter('kana', '%'.$searchData['kana'].'%'); | |
| 324 | 324 | } | 
| 325 | 325 | |
| 326 | 326 | |
| 327 | 327 |          if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { | 
| 328 | 328 | $qb | 
| 329 | 329 |                  ->andWhere('o.email like :email') | 
| 330 | -                ->setParameter('email', '%' . $searchData['email'] . '%'); | |
| 330 | +                ->setParameter('email', '%'.$searchData['email'].'%'); | |
| 331 | 331 | } | 
| 332 | 332 | |
| 333 | 333 | // tel | 
| 334 | 334 |          if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { | 
| 335 | 335 | $qb | 
| 336 | 336 |                  ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') | 
| 337 | -                ->setParameter('tel', '%' . $searchData['tel'] . '%'); | |
| 337 | +                ->setParameter('tel', '%'.$searchData['tel'].'%'); | |
| 338 | 338 | } | 
| 339 | 339 | |
| 340 | 340 | // sex | 
| @@ -446,7 +446,7 @@ discard block | ||
| 446 | 446 | $qb | 
| 447 | 447 |                  ->leftJoin('o.OrderDetails', 'od') | 
| 448 | 448 |                  ->andWhere('od.product_name LIKE :buy_product_name') | 
| 449 | -                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); | |
| 449 | +                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); | |
| 450 | 450 | } | 
| 451 | 451 | |
| 452 | 452 | // Order By | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 |                  $key = sprintf('keyword%s', $index); | 
| 114 | 114 | $qb | 
| 115 | 115 |                      ->andWhere(sprintf('NORMALIZE(p.name) LIKE NORMALIZE(:%s) OR NORMALIZE(p.search_word) LIKE NORMALIZE(:%s)', $key, $key)) | 
| 116 | - ->setParameter($key, '%' . $keyword . '%'); | |
| 116 | + ->setParameter($key, '%'.$keyword.'%'); | |
| 117 | 117 | } | 
| 118 | 118 | } | 
| 119 | 119 | |
| @@ -176,7 +176,7 @@ discard block | ||
| 176 | 176 | $qb | 
| 177 | 177 |                  ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid') | 
| 178 | 178 |                  ->setParameter('id', $id) | 
| 179 | -                ->setParameter('likeid', '%' . $searchData['id'] . '%'); | |
| 179 | +                ->setParameter('likeid', '%'.$searchData['id'].'%'); | |
| 180 | 180 | } | 
| 181 | 181 | |
| 182 | 182 | // code |