@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | { |
18 | 18 | public function register(Container $app) |
19 | 19 | { |
20 | - $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null, Customer $user = null) { |
|
20 | + $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null, Customer $user = null) { |
|
21 | 21 | return new PurchaseContext($origin, $user); |
22 | 22 | }); |
23 | 23 | |
24 | - $app['eccube.purchase.flow.cart.item_processors'] = function (Container $app) { |
|
24 | + $app['eccube.purchase.flow.cart.item_processors'] = function(Container $app) { |
|
25 | 25 | $processors = new ArrayCollection(); |
26 | 26 | $processors[] = new Processor\DisplayStatusValidator(); |
27 | 27 | $processors[] = new Processor\SaleLimitValidator(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return $processors; |
32 | 32 | }; |
33 | 33 | |
34 | - $app['eccube.purchase.flow.cart.holder_processors'] = function (Container $app) { |
|
34 | + $app['eccube.purchase.flow.cart.holder_processors'] = function(Container $app) { |
|
35 | 35 | $processors = new ArrayCollection(); |
36 | 36 | $processors[] = new Processor\PaymentProcessor($app[DeliveryRepository::class]); |
37 | 37 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | return $processors; |
42 | 42 | }; |
43 | 43 | |
44 | - $app['eccube.purchase.flow.cart'] = function (Container $app) { |
|
44 | + $app['eccube.purchase.flow.cart'] = function(Container $app) { |
|
45 | 45 | $flow = new PurchaseFlow(); |
46 | 46 | $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']); |
47 | 47 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return $flow; |
50 | 50 | }; |
51 | 51 | |
52 | - $app['eccube.purchase.flow.shopping.item_processors'] = function (Container $app) { |
|
52 | + $app['eccube.purchase.flow.shopping.item_processors'] = function(Container $app) { |
|
53 | 53 | $processors = new ArrayCollection(); |
54 | 54 | $processors[] = new Processor\StockValidator(); |
55 | 55 | $processors[] = new Processor\DisplayStatusValidator(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return $processors; |
58 | 58 | }; |
59 | 59 | |
60 | - $app['eccube.purchase.flow.shopping.holder_processors'] = function (Container $app) { |
|
60 | + $app['eccube.purchase.flow.shopping.holder_processors'] = function(Container $app) { |
|
61 | 61 | $processors = new ArrayCollection(); |
62 | 62 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
63 | 63 | $processors[] = new Processor\DeliveryFeeProcessor($app['orm.em']); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $processors; |
72 | 72 | }; |
73 | 73 | |
74 | - $app['eccube.purchase.flow.shopping.purchase'] = function (Container $app) { |
|
74 | + $app['eccube.purchase.flow.shopping.purchase'] = function(Container $app) { |
|
75 | 75 | $processors = new ArrayCollection(); |
76 | 76 | if ($app[BaseInfo::class]->isOptionPoint()) { |
77 | 77 | $processors[] = new Processor\UsePointToCustomerPurchaseProcessor(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return $processors; |
81 | 81 | }; |
82 | 82 | |
83 | - $app['eccube.purchase.flow.shopping'] = function (Container $app) { |
|
83 | + $app['eccube.purchase.flow.shopping'] = function(Container $app) { |
|
84 | 84 | $flow = new PurchaseFlow(); |
85 | 85 | $flow->setItemProcessors($app['eccube.purchase.flow.shopping.item_processors']); |
86 | 86 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.shopping.holder_processors']); |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | return $flow; |
90 | 90 | }; |
91 | 91 | |
92 | - $app['eccube.purchase.flow.order.item_processors'] = function (Container $app) { |
|
92 | + $app['eccube.purchase.flow.order.item_processors'] = function(Container $app) { |
|
93 | 93 | $processors = new ArrayCollection(); |
94 | 94 | $processors[] = new Processor\StockValidator(); |
95 | 95 | |
96 | 96 | return $processors; |
97 | 97 | }; |
98 | 98 | |
99 | - $app['eccube.purchase.flow.order.holder_processors'] = function (Container $app) { |
|
99 | + $app['eccube.purchase.flow.order.holder_processors'] = function(Container $app) { |
|
100 | 100 | $processors = new ArrayCollection(); |
101 | 101 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
102 | 102 | $processors[] = new Processor\UpdateDatePurchaseProcessor($app['config']); |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | return $processors; |
110 | 110 | }; |
111 | 111 | |
112 | - $app['eccube.purchase.flow.order.purchase'] = function (Container $app) { |
|
112 | + $app['eccube.purchase.flow.order.purchase'] = function(Container $app) { |
|
113 | 113 | $processors = new ArrayCollection(); |
114 | 114 | $processors[] = new Processor\AdminOrderRegisterPurchaseProcessor($app); |
115 | 115 | |
116 | 116 | return $processors; |
117 | 117 | }; |
118 | 118 | |
119 | - $app['eccube.purchase.flow.order'] = function (Container $app) { |
|
119 | + $app['eccube.purchase.flow.order'] = function(Container $app) { |
|
120 | 120 | $flow = new PurchaseFlow(); |
121 | 121 | $flow->setItemProcessors($app['eccube.purchase.flow.order.item_processors']); |
122 | 122 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.order.holder_processors']); |
@@ -27,14 +27,12 @@ |
||
27 | 27 | use Doctrine\ORM\EntityManager; |
28 | 28 | use Eccube\Annotation\Inject; |
29 | 29 | use Eccube\Application; |
30 | -use Eccube\Common\Constant; |
|
31 | 30 | use Eccube\Controller\AbstractController; |
32 | 31 | use Eccube\Entity\Master\CustomerStatus; |
33 | 32 | use Eccube\Event\EccubeEvents; |
34 | 33 | use Eccube\Event\EventArgs; |
35 | 34 | use Eccube\Repository\Master\CustomerStatusRepository; |
36 | 35 | use Eccube\Service\MailService; |
37 | -use Eccube\Util\StringUtil; |
|
38 | 36 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
39 | 37 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
40 | 38 | use Symfony\Component\EventDispatcher\EventDispatcher; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | foreach ($this->paths as $path) { |
75 | - if ( ! is_dir($path)) { |
|
75 | + if (!is_dir($path)) { |
|
76 | 76 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
77 | 77 | } |
78 | 78 | |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
82 | 82 | \RecursiveIteratorIterator::LEAVES_ONLY |
83 | 83 | ), |
84 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
84 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
85 | 85 | \RecursiveRegexIterator::GET_MATCH |
86 | 86 | ); |
87 | 87 | |
88 | 88 | foreach ($iterator as $file) { |
89 | 89 | $sourceFile = $file[0]; |
90 | 90 | |
91 | - if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
91 | + if (!preg_match('(^phar:)i', $sourceFile)) { |
|
92 | 92 | $sourceFile = realpath($sourceFile); |
93 | 93 | } |
94 | 94 | |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceIndex, [';']); |
134 | 134 | $namespace = $tokens->generatePartialCode($tokens->getNextMeaningfulToken($namespaceIndex), $tokens->getPrevMeaningfulToken($namespaceEndIndex)); |
135 | 135 | $className = $tokens[$classNameTokenIndex]->getContent(); |
136 | - $fqcn = $namespace . '\\' . $className; |
|
137 | - if (class_exists($fqcn) && ! $this->isTransient($fqcn)) { |
|
136 | + $fqcn = $namespace.'\\'.$className; |
|
137 | + if (class_exists($fqcn) && !$this->isTransient($fqcn)) { |
|
138 | 138 | if (in_array($sourceFile, $this->newProxyFiles)) { |
139 | - $newClassName = $className . StringUtil::random(12); |
|
139 | + $newClassName = $className.StringUtil::random(12); |
|
140 | 140 | $tokens[$classNameTokenIndex] = new Token([T_STRING, $newClassName]); |
141 | 141 | $newFilePath = $this->outputDir."${newClassName}.php"; |
142 | 142 | file_put_contents($newFilePath, $tokens->generateCode()); |
143 | 143 | require_once $newFilePath; |
144 | - $results[] = $namespace . "\\${newClassName}"; |
|
144 | + $results[] = $namespace."\\${newClassName}"; |
|
145 | 145 | } else { |
146 | 146 | $results[] = $fqcn; |
147 | 147 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } else { |
94 | 94 | // httpから変更されたらfalseのまま |
95 | 95 | $config['force_ssl'] = Constant::DISABLED; |
96 | - $data['force_ssl'] = (bool)Constant::DISABLED; |
|
96 | + $data['force_ssl'] = (bool) Constant::DISABLED; |
|
97 | 97 | } |
98 | 98 | } else { |
99 | 99 | $config['force_ssl'] = Constant::DISABLED; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | if (count($allowHost) > 0) { |
139 | 139 | $form->get('admin_allow_hosts')->setData(StringUtil::convertLineFeed(implode("\n", $allowHost))); |
140 | 140 | } |
141 | - $form->get('force_ssl')->setData((bool)$this->appConfig['force_ssl']); |
|
141 | + $form->get('force_ssl')->setData((bool) $this->appConfig['force_ssl']); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return [ |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | public function updateSchema($generatedFiles, $proxiesDirectory) |
46 | 46 | { |
47 | - $outputDir = sys_get_temp_dir() . '/proxy_' . StringUtil::random(12); |
|
47 | + $outputDir = sys_get_temp_dir().'/proxy_'.StringUtil::random(12); |
|
48 | 48 | mkdir($outputDir); |
49 | 49 | |
50 | 50 | try { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | return $value; |
160 | 160 | } |
161 | 161 | |
162 | - return rtrim(mb_substr($value, 0, $length, 'UTF-8')) . $end; |
|
162 | + return rtrim(mb_substr($value, 0, $length, 'UTF-8')).$end; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | |
@@ -186,18 +186,18 @@ discard block |
||
186 | 186 | } |
187 | 187 | if ($diff->m == 1 || $diff->days > 0) { |
188 | 188 | if ($diff->days <= 31) { |
189 | - return $diff->days . '日前'; |
|
189 | + return $diff->days.'日前'; |
|
190 | 190 | } |
191 | 191 | // return $date->format("Y/m/d H:i"); |
192 | 192 | return $date->format("Y/m/d"); |
193 | 193 | } |
194 | 194 | if ($diff->h > 0) { |
195 | - return $diff->h . "時間前"; |
|
195 | + return $diff->h."時間前"; |
|
196 | 196 | } |
197 | 197 | if ($diff->i > 0) { |
198 | - return $diff->i . "分前"; |
|
198 | + return $diff->i."分前"; |
|
199 | 199 | } |
200 | - return $diff->s . "秒前"; |
|
200 | + return $diff->s."秒前"; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // 支払い方法のプルダウンを生成 |
111 | 111 | $builder->addEventListener( |
112 | 112 | FormEvents::PRE_SET_DATA, |
113 | - function (FormEvent $event) { |
|
113 | + function(FormEvent $event) { |
|
114 | 114 | /** @var Order $Order */ |
115 | 115 | $Order = $event->getData(); |
116 | 116 | if (is_null($Order) || !$Order->getId()) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // TODO Calculatorで行うのが適切. |
159 | 159 | $builder->addEventListener( |
160 | 160 | FormEvents::POST_SUBMIT, |
161 | - function (FormEvent $event) { |
|
161 | + function(FormEvent $event) { |
|
162 | 162 | /** @var Order $Order */ |
163 | 163 | $Order = $event->getData(); |
164 | 164 | // XXX 非会員購入の際, use_point が null で submit される? |
@@ -12,7 +12,7 @@ discard block |
||
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'], |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // XXX これを入れないと EntityEventDispatcher が有効になった時テストがコケる |
39 | 39 | if (!$app->offsetExists('eccube.event.dispatcher')) { |
40 | - $app['eccube.event.dispatcher'] = function () use ($app) { |
|
40 | + $app['eccube.event.dispatcher'] = function() use ($app) { |
|
41 | 41 | return $app['dispatcher']; |
42 | 42 | }; |
43 | 43 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function register(Container $app) |
40 | 40 | { |
41 | - $app['eccube.service.composer'] = function () use ($app) { |
|
41 | + $app['eccube.service.composer'] = function() use ($app) { |
|
42 | 42 | /**@var \Eccube\Service\SystemService $systemService */ |
43 | 43 | $systemService = $app['eccube.service.system']; |
44 | 44 | $composerMemory = $app['config']['composer_memory_limit']; |