@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | use Eccube\Annotation\FormType; |
28 | 28 | use \Symfony\Component\Form\AbstractType; |
29 | -use \Symfony\Component\Form\Extension\Core\Type\CheckboxType;; |
|
29 | +use \Symfony\Component\Form\Extension\Core\Type\CheckboxType; ; |
|
30 | 30 | use \Symfony\Component\Form\FormBuilderInterface; |
31 | 31 | |
32 | 32 | /** |
@@ -1117,7 +1117,7 @@ |
||
1117 | 1117 | |
1118 | 1118 | // 配送日数が設定されている |
1119 | 1119 | if ($deliveryDateFlag) { |
1120 | - $period = new \DatePeriod ( |
|
1120 | + $period = new \DatePeriod( |
|
1121 | 1121 | new \DateTime($minDate.' day'), |
1122 | 1122 | new \DateInterval('P1D'), |
1123 | 1123 | new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day') |
@@ -197,7 +197,7 @@ |
||
197 | 197 | $this->appConfig['block_default_realdir'], |
198 | 198 | ); |
199 | 199 | foreach ($readPaths as $readPath) { |
200 | - $filePath = $readPath . '/' . $fileName . '.twig'; |
|
200 | + $filePath = $readPath.'/'.$fileName.'.twig'; |
|
201 | 201 | $fs = new Filesystem(); |
202 | 202 | if ($fs->exists($filePath)) { |
203 | 203 | return array( |
@@ -20,34 +20,34 @@ |
||
20 | 20 | |
21 | 21 | public function register(Container $app) |
22 | 22 | { |
23 | - $app['eccube.service.cart'] = function () use ($app) { |
|
23 | + $app['eccube.service.cart'] = function() use ($app) { |
|
24 | 24 | return $app[CartService::class]; |
25 | 25 | }; |
26 | - $app['eccube.service.order'] = function () use ($app) { |
|
26 | + $app['eccube.service.order'] = function() use ($app) { |
|
27 | 27 | return $app[OrderService::class]; |
28 | 28 | }; |
29 | - $app['eccube.service.tax_rule'] = function () use ($app) { |
|
29 | + $app['eccube.service.tax_rule'] = function() use ($app) { |
|
30 | 30 | return $app[TaxRuleService::class]; |
31 | 31 | }; |
32 | - $app['eccube.service.plugin'] = function () use ($app) { |
|
32 | + $app['eccube.service.plugin'] = function() use ($app) { |
|
33 | 33 | return $app[PluginService::class]; |
34 | 34 | }; |
35 | - $app['eccube.service.mail'] = function () use ($app) { |
|
35 | + $app['eccube.service.mail'] = function() use ($app) { |
|
36 | 36 | return $app[MailService::class]; |
37 | 37 | }; |
38 | - $app['eccube.helper.order'] = function ($app) { |
|
38 | + $app['eccube.helper.order'] = function($app) { |
|
39 | 39 | return $app[OrderHelper::class]; |
40 | 40 | }; |
41 | - $app['eccube.service.csv.export'] = function () use ($app) { |
|
41 | + $app['eccube.service.csv.export'] = function() use ($app) { |
|
42 | 42 | return $app[CsvExportService::class]; |
43 | 43 | }; |
44 | - $app['eccube.service.shopping'] = function () use ($app) { |
|
44 | + $app['eccube.service.shopping'] = function() use ($app) { |
|
45 | 45 | return $app[ShoppingService::class]; |
46 | 46 | }; |
47 | - $app['eccube.service.payment'] = function () use ($app) { |
|
47 | + $app['eccube.service.payment'] = function() use ($app) { |
|
48 | 48 | return $app[PaymentService::class]; |
49 | 49 | }; |
50 | - $app['eccube.service.system'] = function () use ($app) { |
|
50 | + $app['eccube.service.system'] = function() use ($app) { |
|
51 | 51 | return $app[SystemService::class]; |
52 | 52 | }; |
53 | 53 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | ); |
24 | 24 | } |
25 | 25 | |
26 | - $app[TwigLintValidator::class] = function (Container $app) { |
|
26 | + $app[TwigLintValidator::class] = function(Container $app) { |
|
27 | 27 | return new TwigLintValidator($app['twig']); |
28 | 28 | }; |
29 | 29 |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | log_info('受注削除開始', array($Order->getId())); |
304 | 304 | |
305 | 305 | // 出荷に紐付いている明細がある場合は削除できない. |
306 | - $hasShipping = $Order->getItems()->exists(function ($k, $v) { |
|
306 | + $hasShipping = $Order->getItems()->exists(function($k, $v) { |
|
307 | 307 | return false === is_null($v->getShipping()); |
308 | 308 | }); |
309 | 309 | if ($hasShipping) { |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $em->getConfiguration()->setSQLLogger(null); |
362 | 362 | |
363 | 363 | $response = new StreamedResponse(); |
364 | - $response->setCallback(function () use ($app, $request) { |
|
364 | + $response->setCallback(function() use ($app, $request) { |
|
365 | 365 | |
366 | 366 | // CSV種別を元に初期化. |
367 | 367 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_ORDER); |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | |
376 | 376 | // データ行の出力. |
377 | 377 | $this->csvExportService->setExportQueryBuilder($qb); |
378 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
378 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
379 | 379 | |
380 | 380 | $Csvs = $csvService->getCsvs(); |
381 | 381 | |
@@ -416,9 +416,9 @@ discard block |
||
416 | 416 | }); |
417 | 417 | |
418 | 418 | $now = new \DateTime(); |
419 | - $filename = 'order_' . $now->format('YmdHis') . '.csv'; |
|
419 | + $filename = 'order_'.$now->format('YmdHis').'.csv'; |
|
420 | 420 | $response->headers->set('Content-Type', 'application/octet-stream'); |
421 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
421 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
422 | 422 | $response->send(); |
423 | 423 | |
424 | 424 | log_info('受注CSV出力ファイル名', array($filename)); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $em->getConfiguration()->setSQLLogger(null); |
446 | 446 | |
447 | 447 | $response = new StreamedResponse(); |
448 | - $response->setCallback(function () use ($app, $request) { |
|
448 | + $response->setCallback(function() use ($app, $request) { |
|
449 | 449 | |
450 | 450 | // CSV種別を元に初期化. |
451 | 451 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_SHIPPING); |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | |
460 | 460 | // データ行の出力. |
461 | 461 | $this->csvExportService->setExportQueryBuilder($qb); |
462 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
462 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
463 | 463 | |
464 | 464 | $Csvs = $csvService->getCsvs(); |
465 | 465 | |
@@ -509,9 +509,9 @@ discard block |
||
509 | 509 | }); |
510 | 510 | |
511 | 511 | $now = new \DateTime(); |
512 | - $filename = 'shipping_' . $now->format('YmdHis') . '.csv'; |
|
512 | + $filename = 'shipping_'.$now->format('YmdHis').'.csv'; |
|
513 | 513 | $response->headers->set('Content-Type', 'application/octet-stream'); |
514 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
514 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
515 | 515 | $response->send(); |
516 | 516 | |
517 | 517 | log_info('配送CSV出力ファイル名', array($filename)); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | { |
43 | 43 | $qb = $this->createQueryBuilder('e') |
44 | 44 | ->innerJoin('e.Plugin', 'p') |
45 | - ->Orderby('e.event','ASC') |
|
46 | - ->addOrderby('e.priority','DESC'); |
|
45 | + ->Orderby('e.event', 'ASC') |
|
46 | + ->addOrderby('e.priority', 'DESC'); |
|
47 | 47 | ; |
48 | 48 | |
49 | 49 | return $qb->getQuery()->getResult(); |
@@ -52,65 +52,65 @@ discard block |
||
52 | 52 | public function getPriorityRange($type) |
53 | 53 | { |
54 | 54 | |
55 | - if(PluginEventHandler::EVENT_HANDLER_TYPE_FIRST==$type){ |
|
56 | - $range_start=PluginEventHandler::EVENT_PRIORITY_FIRST_START; |
|
57 | - $range_end=PluginEventHandler::EVENT_PRIORITY_FIRST_END; |
|
58 | - }elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){ |
|
59 | - $range_start=PluginEventHandler::EVENT_PRIORITY_LAST_START; |
|
60 | - $range_end=PluginEventHandler::EVENT_PRIORITY_LAST_END; |
|
61 | - }else{ |
|
62 | - $range_start=PluginEventHandler::EVENT_PRIORITY_NORMAL_START; |
|
63 | - $range_end=PluginEventHandler::EVENT_PRIORITY_NORMAL_END; |
|
55 | + if (PluginEventHandler::EVENT_HANDLER_TYPE_FIRST == $type) { |
|
56 | + $range_start = PluginEventHandler::EVENT_PRIORITY_FIRST_START; |
|
57 | + $range_end = PluginEventHandler::EVENT_PRIORITY_FIRST_END; |
|
58 | + }elseif (PluginEventHandler::EVENT_HANDLER_TYPE_LAST == $type) { |
|
59 | + $range_start = PluginEventHandler::EVENT_PRIORITY_LAST_START; |
|
60 | + $range_end = PluginEventHandler::EVENT_PRIORITY_LAST_END; |
|
61 | + } else { |
|
62 | + $range_start = PluginEventHandler::EVENT_PRIORITY_NORMAL_START; |
|
63 | + $range_end = PluginEventHandler::EVENT_PRIORITY_NORMAL_END; |
|
64 | 64 | } |
65 | - return array($range_start,$range_end); |
|
65 | + return array($range_start, $range_end); |
|
66 | 66 | |
67 | 67 | } |
68 | 68 | |
69 | - public function calcNewPriority($event , $type) |
|
69 | + public function calcNewPriority($event, $type) |
|
70 | 70 | { |
71 | 71 | |
72 | - list($range_start,$range_end) = $this->getPriorityRange($type); |
|
72 | + list($range_start, $range_end) = $this->getPriorityRange($type); |
|
73 | 73 | |
74 | 74 | $qb = $this->createQueryBuilder('e'); |
75 | 75 | $qb->andWhere("e.priority >= $range_end ") |
76 | 76 | ->andWhere("e.priority <= $range_start ") |
77 | 77 | ->andWhere('e.event = :event') |
78 | - ->setParameter('event',$event) |
|
78 | + ->setParameter('event', $event) |
|
79 | 79 | ->setMaxResults(1) |
80 | - ->orderBy('e.priority','ASC'); |
|
80 | + ->orderBy('e.priority', 'ASC'); |
|
81 | 81 | |
82 | - $result=$qb->getQuery()->getResult(); |
|
83 | - if(count($result)){ |
|
84 | - return $result[0]->getPriority() -1; |
|
85 | - }else{ |
|
82 | + $result = $qb->getQuery()->getResult(); |
|
83 | + if (count($result)) { |
|
84 | + return $result[0]->getPriority() - 1; |
|
85 | + } else { |
|
86 | 86 | return $range_start; |
87 | 87 | } |
88 | 88 | |
89 | 89 | } |
90 | 90 | |
91 | - public function upPriority($pluginEventHandler,$up=true) |
|
91 | + public function upPriority($pluginEventHandler, $up = true) |
|
92 | 92 | { |
93 | 93 | |
94 | - list($range_start,$range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType()); |
|
94 | + list($range_start, $range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType()); |
|
95 | 95 | |
96 | 96 | $qb = $this->createQueryBuilder('e'); |
97 | 97 | |
98 | 98 | $qb->andWhere("e.priority >= $range_end ") |
99 | 99 | ->andWhere("e.priority <= $range_start ") |
100 | - ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
100 | + ->andWhere('e.priority '.($up ? '>' : '<').' :pri') |
|
101 | 101 | ->andWhere('e.event = :event') |
102 | - ->setParameter('event',$pluginEventHandler->getEvent()) |
|
103 | - ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
102 | + ->setParameter('event', $pluginEventHandler->getEvent()) |
|
103 | + ->setParameter('pri', $pluginEventHandler->getPriority()) |
|
104 | 104 | ->setMaxResults(1) |
105 | - ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
105 | + ->orderBy('e.priority', ($up ? 'ASC' : 'DESC')); |
|
106 | 106 | |
107 | - $result=$qb->getQuery()->getResult(); |
|
107 | + $result = $qb->getQuery()->getResult(); |
|
108 | 108 | |
109 | - if(count($result)){ |
|
110 | - $em =$this->getEntityManager(); |
|
109 | + if (count($result)) { |
|
110 | + $em = $this->getEntityManager(); |
|
111 | 111 | $em->getConnection()->beginTransaction(); |
112 | 112 | // 2個のentityのprioriryを入れ替える |
113 | - $tmp=$pluginEventHandler->getPriority(); |
|
113 | + $tmp = $pluginEventHandler->getPriority(); |
|
114 | 114 | $pluginEventHandler->setPriority($result[0]->getPriority()); |
115 | 115 | $result[0]->setPriority($tmp); |
116 | 116 | $em->persist($result[0]); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $em->flush(); |
119 | 119 | $em->getConnection()->commit(); |
120 | 120 | # 移動する |
121 | - }else{ |
|
121 | + } else { |
|
122 | 122 | # 移動しない |
123 | 123 | throw new PluginException("Can't swap"); |
124 | 124 | } |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function register(Container $app) |
65 | 65 | { |
66 | - $app[BaseInfo::class] = function () use ($app) { |
|
66 | + $app[BaseInfo::class] = function() use ($app) { |
|
67 | 67 | return $app[BaseInfoRepository::class]->get(); |
68 | 68 | }; |
69 | 69 | |
70 | - $app['eccube.calculate.context'] = function () use ($app) { |
|
70 | + $app['eccube.calculate.context'] = function() use ($app) { |
|
71 | 71 | return new \Eccube\Service\Calculator\CalculateContext(); |
72 | 72 | }; |
73 | 73 | |
74 | - $app['eccube.calculate.strategies'] = function () use ($app) { |
|
74 | + $app['eccube.calculate.strategies'] = function() use ($app) { |
|
75 | 75 | $Collection = new \Eccube\Service\Calculator\CalculateStrategyCollection(); |
76 | 76 | $Collection->setApplication($app); |
77 | 77 | //$Collection->setOrder($Order); |
@@ -84,47 +84,47 @@ discard block |
||
84 | 84 | $Collection->add($app['eccube.calculate.strategy.calculate_total']); |
85 | 85 | return $Collection; |
86 | 86 | }; |
87 | - $app['eccube.calculate.strategy.shipping'] = function () use ($app) { |
|
87 | + $app['eccube.calculate.strategy.shipping'] = function() use ($app) { |
|
88 | 88 | $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy(); |
89 | 89 | $Strategy->setApplication($app); |
90 | 90 | return $Strategy; |
91 | 91 | }; |
92 | - $app['eccube.calculate.strategy.charge'] = function () use ($app) { |
|
92 | + $app['eccube.calculate.strategy.charge'] = function() use ($app) { |
|
93 | 93 | $Strategy = new \Eccube\Service\Calculator\Strategy\ChargeStrategy(); |
94 | 94 | $Strategy->setApplication($app); |
95 | 95 | return $Strategy; |
96 | 96 | }; |
97 | 97 | |
98 | - $app['eccube.calculate.strategy.tax'] = function () use ($app) { |
|
98 | + $app['eccube.calculate.strategy.tax'] = function() use ($app) { |
|
99 | 99 | $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy(); |
100 | 100 | $Strategy->setApplication($app); |
101 | 101 | return $Strategy; |
102 | 102 | }; |
103 | 103 | |
104 | - $app['eccube.calculate.strategy.calculate_delivery_fee'] = function () use ($app) { |
|
104 | + $app['eccube.calculate.strategy.calculate_delivery_fee'] = function() use ($app) { |
|
105 | 105 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateDeliveryFeeStrategy(); |
106 | 106 | $Strategy->setApplication($app); |
107 | 107 | return $Strategy; |
108 | 108 | }; |
109 | - $app['eccube.calculate.strategy.calculate_charge'] = function () use ($app) { |
|
109 | + $app['eccube.calculate.strategy.calculate_charge'] = function() use ($app) { |
|
110 | 110 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateChargeStrategy(); |
111 | 111 | $Strategy->setApplication($app); |
112 | 112 | return $Strategy; |
113 | 113 | }; |
114 | - $app['eccube.calculate.strategy.calculate_total'] = function () use ($app) { |
|
114 | + $app['eccube.calculate.strategy.calculate_total'] = function() use ($app) { |
|
115 | 115 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateTotalStrategy(); |
116 | 116 | $Strategy->setApplication($app); |
117 | 117 | return $Strategy; |
118 | 118 | }; |
119 | 119 | |
120 | - $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) { |
|
120 | + $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) { |
|
121 | 121 | $PaymentMethod = new $clazz; |
122 | 122 | $PaymentMethod->setApplication($app); |
123 | 123 | $PaymentMethod->setFormType($form); |
124 | 124 | return $PaymentMethod; |
125 | 125 | }); |
126 | 126 | |
127 | - $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) { |
|
127 | + $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) { |
|
128 | 128 | $PaymentMethod = new $clazz; |
129 | 129 | $PaymentMethod->setApplication($app); |
130 | 130 | $PaymentMethod->setFormType($form); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | return $PaymentMethod; |
133 | 133 | }); |
134 | 134 | |
135 | - $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) { |
|
135 | + $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) { |
|
136 | 136 | $Service = new \Eccube\Service\CalculateService($Order, $Customer); |
137 | 137 | $Context = $app['eccube.calculate.context']; |
138 | 138 | $app['eccube.calculate.strategies']->setOrder($Order); |
@@ -143,24 +143,24 @@ discard block |
||
143 | 143 | return $Service; |
144 | 144 | }); |
145 | 145 | |
146 | - $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) { |
|
146 | + $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) { |
|
147 | 147 | $Service = new $clazz($app['request_stack']); |
148 | 148 | |
149 | 149 | return $Service; |
150 | 150 | }); |
151 | 151 | |
152 | - $app['paginator'] = $app->protect(function () { |
|
152 | + $app['paginator'] = $app->protect(function() { |
|
153 | 153 | $paginator = new \Knp\Component\Pager\Paginator(); |
154 | 154 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
155 | 155 | |
156 | 156 | return $paginator; |
157 | 157 | }); |
158 | 158 | |
159 | - $app['request_scope'] = function () { |
|
159 | + $app['request_scope'] = function() { |
|
160 | 160 | return new ParameterBag(); |
161 | 161 | }; |
162 | 162 | // TODO 使用するか検討 |
163 | - $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) { |
|
163 | + $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) { |
|
164 | 164 | $compiler |
165 | 165 | ->addDebugInfo($node) |
166 | 166 | ->write("echo 'Helloooooo ' . ") |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | }); |
172 | 172 | // TODO 使用するか検討 |
173 | - $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) { |
|
173 | + $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) { |
|
174 | 174 | $compiler |
175 | 175 | ->addDebugInfo($node) |
176 | 176 | ->write("echo 'jirooooooo ' . ") |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | }); |
182 | 182 | |
183 | 183 | // TODO 使用するか検討 |
184 | - $app['eccube.twig.generic_node_names'] = function () use ($app) { |
|
184 | + $app['eccube.twig.generic_node_names'] = function() use ($app) { |
|
185 | 185 | return [ |
186 | 186 | 'hello', |
187 | 187 | 'jiro', |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | }; |
191 | 191 | |
192 | 192 | // TODO 使用するか検討 |
193 | - $app['twig_parsers'] = function () use ($app) { |
|
193 | + $app['twig_parsers'] = function() use ($app) { |
|
194 | 194 | $GenericTokenParsers = []; |
195 | 195 | foreach ($app['eccube.twig.generic_node_names'] as $tagName) { |
196 | 196 | $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName); |
@@ -198,22 +198,22 @@ discard block |
||
198 | 198 | return $GenericTokenParsers; |
199 | 199 | }; |
200 | 200 | |
201 | - $app['eccube.twig.block.templates'] = function () { |
|
201 | + $app['eccube.twig.block.templates'] = function() { |
|
202 | 202 | $templates = new ArrayCollection(); |
203 | 203 | $templates[] = 'render_block.twig'; |
204 | 204 | |
205 | 205 | return $templates; |
206 | 206 | }; |
207 | 207 | |
208 | - $app['eccube.queries'] = function () { |
|
208 | + $app['eccube.queries'] = function() { |
|
209 | 209 | return new \Eccube\Doctrine\Query\Queries(); |
210 | 210 | }; |
211 | 211 | |
212 | - $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null) { |
|
212 | + $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null) { |
|
213 | 213 | return new PurchaseContext($origin); |
214 | 214 | }); |
215 | 215 | |
216 | - $app['eccube.purchase.flow.cart.item_processors'] = function ($app) { |
|
216 | + $app['eccube.purchase.flow.cart.item_processors'] = function($app) { |
|
217 | 217 | $processors = new ArrayCollection(); |
218 | 218 | $processors->add(new DisplayStatusValidator()); |
219 | 219 | $processors->add(new SaleLimitValidator()); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | return $processors; |
223 | 223 | }; |
224 | 224 | |
225 | - $app['eccube.purchase.flow.cart.holder_processors'] = function ($app) { |
|
225 | + $app['eccube.purchase.flow.cart.holder_processors'] = function($app) { |
|
226 | 226 | $processors = new ArrayCollection(); |
227 | 227 | $processors->add(new PaymentProcessor($app[DeliveryRepository::class])); |
228 | 228 | $processors->add(new PaymentTotalLimitValidator($app['config']['max_total_fee'])); |
@@ -233,14 +233,14 @@ discard block |
||
233 | 233 | }; |
234 | 234 | |
235 | 235 | // example |
236 | - $app->extend('eccube.purchase.flow.cart.item_processors', function ($processors, $app) { |
|
236 | + $app->extend('eccube.purchase.flow.cart.item_processors', function($processors, $app) { |
|
237 | 237 | |
238 | 238 | $processors->add(new StockValidator()); |
239 | 239 | |
240 | 240 | return $processors; |
241 | 241 | }); |
242 | 242 | |
243 | - $app['eccube.purchase.flow.cart'] = function ($app) { |
|
243 | + $app['eccube.purchase.flow.cart'] = function($app) { |
|
244 | 244 | $flow = new PurchaseFlow(); |
245 | 245 | $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']); |
246 | 246 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | return $flow; |
249 | 249 | }; |
250 | 250 | |
251 | - $app['eccube.purchase.flow.shopping'] = function () use ($app) { |
|
251 | + $app['eccube.purchase.flow.shopping'] = function() use ($app) { |
|
252 | 252 | $flow = new PurchaseFlow(); |
253 | 253 | $flow->addItemProcessor(new StockValidator()); |
254 | 254 | $flow->addItemProcessor(new DisplayStatusValidator()); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | return $flow; |
259 | 259 | }; |
260 | 260 | |
261 | - $app['eccube.purchase.flow.order'] = function () use ($app) { |
|
261 | + $app['eccube.purchase.flow.order'] = function() use ($app) { |
|
262 | 262 | $flow = new PurchaseFlow(); |
263 | 263 | $flow->addItemProcessor(new StockValidator()); |
264 | 264 | $flow->addItemHolderProcessor(new PaymentTotalLimitValidator($app['config']['max_total_fee'])); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $num = $this->productClassRepository->createQueryBuilder('pc') |
183 | 183 | ->select('count(pc.id)') |
184 | 184 | ->where('pc.ClassCategory1 = :id OR pc.ClassCategory2 = :id') |
185 | - ->setParameter('id',$id) |
|
185 | + ->setParameter('id', $id) |
|
186 | 186 | ->getQuery() |
187 | 187 | ->getSingleScalarResult(); |
188 | 188 | if ($num > 0) { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | log_error('規格分類削除エラー', array($id, $e)); |
209 | 209 | |
210 | 210 | $message = $app->trans('admin.delete.failed.foreign_key', ['%name%' => '規格分類']); |
211 | - $app->addError($message, 'admin'); } |
|
211 | + $app->addError($message, 'admin'); } |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | return $app->redirect($app->url('admin_product_class_category', array('class_name_id' => $ClassName->getId()))); |