@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Doctrine\Common\DataFixtures\FixtureInterface; |
| 6 | 6 | use Doctrine\Common\Persistence\ObjectManager; |
| 7 | 7 | use Doctrine\DBAL\Connection; |
| 8 | -use Doctrine\DBAL\Schema\Table; |
|
| 9 | 8 | |
| 10 | 9 | /** |
| 11 | 10 | * CSVファイルを扱うためのフィクスチャ. |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function load(ObjectManager $manager) |
| 29 | 29 | { |
| 30 | 30 | // CSV Reader に設定 |
| 31 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY); |
|
| 31 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY); |
|
| 32 | 32 | |
| 33 | 33 | // ヘッダ行を取得 |
| 34 | 34 | $headers = $this->file->current(); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Doctrine\DBAL\Migrations\AbstractMigration; |
| 6 | 6 | use Doctrine\DBAL\Schema\Schema; |
| 7 | -use Eccube\Entity\Master\CsvType; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * Auto-generated Migration: Please modify to your needs! |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ->name('*.csv') |
| 44 | 44 | ->sort( |
| 45 | 45 | // 定義ファイルに記載の順にソート. |
| 46 | - function (\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 46 | + function(\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 47 | 47 | if (!isset($definition[$a->getFilename()])) { |
| 48 | 48 | throw new \Exception(sprintf('"%s" is undefined in %s', $a->getFilename())); |
| 49 | 49 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $this->register(new \Silex\Provider\ValidatorServiceProvider()); |
| 165 | 165 | $this->register(new MobileDetectServiceProvider()); |
| 166 | 166 | |
| 167 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
| 167 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
| 168 | 168 | if ($this['debug']) { |
| 169 | 169 | return; |
| 170 | 170 | } |
@@ -258,14 +258,14 @@ discard block |
||
| 258 | 258 | return $router; |
| 259 | 259 | }); |
| 260 | 260 | |
| 261 | - $this['eccube.router.origin'] = function ($app) { |
|
| 261 | + $this['eccube.router.origin'] = function($app) { |
|
| 262 | 262 | $resource = __DIR__.'/Controller'; |
| 263 | 263 | $cachePrefix = 'Origin'; |
| 264 | 264 | |
| 265 | 265 | return $app['eccube.router']($resource, $cachePrefix); |
| 266 | 266 | }; |
| 267 | 267 | |
| 268 | - $this['eccube.routers.plugin'] = function ($app) { |
|
| 268 | + $this['eccube.routers.plugin'] = function($app) { |
|
| 269 | 269 | // TODO 有効なプラグインを対象とする必要がある. |
| 270 | 270 | $dirs = Finder::create() |
| 271 | 271 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | return $routers; |
| 283 | 283 | }; |
| 284 | 284 | |
| 285 | - $this['eccube.router.extend'] = function ($app) { |
|
| 285 | + $this['eccube.router.extend'] = function($app) { |
|
| 286 | 286 | // TODO ディレクトリ名は暫定 |
| 287 | 287 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
| 288 | 288 | $cachePrefix = 'Extend'; |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | return $router; |
| 293 | 293 | }; |
| 294 | 294 | |
| 295 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
| 295 | + $this->extend('request_matcher', function($matcher, $app) { |
|
| 296 | 296 | $matchers = []; |
| 297 | 297 | $matchers[] = $app['eccube.router.extend']; |
| 298 | 298 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | return new ChainUrlMatcher($matchers, $app['request_context']); |
| 305 | 305 | }); |
| 306 | 306 | |
| 307 | - $this->extend('url_generator', function ($generator, $app) { |
|
| 307 | + $this->extend('url_generator', function($generator, $app) { |
|
| 308 | 308 | $generators = []; |
| 309 | 309 | $generators[] = $app['eccube.router.extend']; |
| 310 | 310 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
| 336 | 336 | 'locale_fallbacks' => ['ja', 'en'], |
| 337 | 337 | )); |
| 338 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
| 338 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
| 339 | 339 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
| 340 | 340 | |
| 341 | 341 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -382,14 +382,14 @@ discard block |
||
| 382 | 382 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
| 383 | 383 | 'twig.form.templates' => array('Form/form_layout.twig'), |
| 384 | 384 | )); |
| 385 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
| 385 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
| 386 | 386 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
| 387 | 387 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
| 388 | 388 | |
| 389 | 389 | return $twig; |
| 390 | 390 | }); |
| 391 | 391 | |
| 392 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
| 392 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
| 393 | 393 | $app['admin'] = $app['front'] = false; |
| 394 | 394 | $pathinfo = rawurldecode($request->getPathInfo()); |
| 395 | 395 | if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) { |
@@ -405,14 +405,14 @@ discard block |
||
| 405 | 405 | } |
| 406 | 406 | $paths[] = $app['config']['template_admin_realdir']; |
| 407 | 407 | $paths[] = __DIR__.'/../../app/Plugin'; |
| 408 | - $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
| 408 | + $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
| 409 | 409 | } else { |
| 410 | 410 | if (file_exists($app['config']['template_realdir'])) { |
| 411 | 411 | $paths[] = $app['config']['template_realdir']; |
| 412 | 412 | } |
| 413 | 413 | $paths[] = $app['config']['template_default_realdir']; |
| 414 | 414 | $paths[] = __DIR__.'/../../app/Plugin'; |
| 415 | - $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
| 415 | + $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
| 416 | 416 | } |
| 417 | 417 | $app['twig']->setCache($app['debug'] ? null : $cacheDir); |
| 418 | 418 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | }, self::EARLY_EVENT); |
| 431 | 431 | |
| 432 | 432 | // twigのグローバル変数を定義. |
| 433 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 433 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 434 | 434 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
| 435 | 435 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
| 436 | 436 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
| 498 | 498 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
| 499 | 499 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
| 500 | - \Swift::init(function () { |
|
| 500 | + \Swift::init(function() { |
|
| 501 | 501 | \Swift_DependencyContainer::getInstance() |
| 502 | 502 | ->register('mime.qpheaderencoder') |
| 503 | 503 | ->asAliasOf('mime.base64headerencoder'); |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | 'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract', |
| 630 | 630 | ), |
| 631 | 631 | )); |
| 632 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 632 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 633 | 633 | // tax_rule |
| 634 | 634 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
| 635 | 635 | $taxRuleRepository->setApplication($app); |
@@ -729,31 +729,31 @@ discard block |
||
| 729 | 729 | array('^/mypage', 'ROLE_USER', $channel), |
| 730 | 730 | ); |
| 731 | 731 | |
| 732 | - $this['eccube.password_encoder'] = function ($app) { |
|
| 732 | + $this['eccube.password_encoder'] = function($app) { |
|
| 733 | 733 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
| 734 | 734 | }; |
| 735 | - $this['security.encoder_factory'] = function ($app) { |
|
| 735 | + $this['security.encoder_factory'] = function($app) { |
|
| 736 | 736 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
| 737 | 737 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
| 738 | 738 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
| 739 | 739 | )); |
| 740 | 740 | }; |
| 741 | - $this['eccube.event_listner.security'] = function ($app) { |
|
| 741 | + $this['eccube.event_listner.security'] = function($app) { |
|
| 742 | 742 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
| 743 | 743 | }; |
| 744 | 744 | |
| 745 | 745 | // Voterの設定 |
| 746 | - $this['authority_voter'] = function ($app) { |
|
| 746 | + $this['authority_voter'] = function($app) { |
|
| 747 | 747 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
| 748 | 748 | }; |
| 749 | 749 | |
| 750 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
| 750 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
| 751 | 751 | $voters[] = $app['authority_voter']; |
| 752 | 752 | |
| 753 | 753 | return $voters; |
| 754 | 754 | }); |
| 755 | 755 | |
| 756 | - $this['security.access_manager'] = function ($app) { |
|
| 756 | + $this['security.access_manager'] = function($app) { |
|
| 757 | 757 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
| 758 | 758 | }; |
| 759 | 759 | |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | { |
| 768 | 768 | $config = $this['config']; |
| 769 | 769 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
| 770 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
| 770 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
| 771 | 771 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
| 772 | 772 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
| 773 | 773 | }, self::EARLY_EVENT); |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | $app = $this; |
| 928 | 928 | |
| 929 | 929 | // Response Event(http cache対応、event実行は一番遅く設定) |
| 930 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 930 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 931 | 931 | |
| 932 | 932 | if (!$event->isMasterRequest()) { |
| 933 | 933 | return; |