@@ -58,9 +58,9 @@ |
||
58 | 58 | |
59 | 59 | // 同じパッケージのEntityがあれば返す |
60 | 60 | if (count($partsOfFqcn) > 2) { |
61 | - $parentNamespace = implode('\\', array_slice($partsOfFqcn, 0, count($partsOfFqcn)-2)); |
|
62 | - $entityName = preg_replace('/(.*)Repository/', '$1', $partsOfFqcn[count($partsOfFqcn) -1]); |
|
63 | - $result = $parentNamespace . '\\Entity\\' . $entityName; |
|
61 | + $parentNamespace = implode('\\', array_slice($partsOfFqcn, 0, count($partsOfFqcn) - 2)); |
|
62 | + $entityName = preg_replace('/(.*)Repository/', '$1', $partsOfFqcn[count($partsOfFqcn) - 1]); |
|
63 | + $result = $parentNamespace.'\\Entity\\'.$entityName; |
|
64 | 64 | if (class_exists($result)) { |
65 | 65 | return $result; |
66 | 66 | } |
@@ -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']); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | )); |
80 | 80 | |
81 | 81 | $message = \Swift_Message::newInstance() |
82 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
82 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
83 | 83 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
84 | 84 | ->setTo(array($Customer->getEmail())) |
85 | 85 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | )); |
121 | 121 | |
122 | 122 | $message = \Swift_Message::newInstance() |
123 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。') |
|
123 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。') |
|
124 | 124 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
125 | 125 | ->setTo(array($Customer->getEmail())) |
126 | 126 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | )); |
163 | 163 | |
164 | 164 | $message = \Swift_Message::newInstance() |
165 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了') |
|
165 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了') |
|
166 | 166 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
167 | 167 | ->setTo(array($email)) |
168 | 168 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | // 問い合わせ者にメール送信 |
207 | 207 | $message = \Swift_Message::newInstance() |
208 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。') |
|
208 | + ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。') |
|
209 | 209 | ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName())) |
210 | 210 | ->setTo(array($formData['email'])) |
211 | 211 | ->setBcc($this->BaseInfo->getEmail02()) |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | )); |
263 | 263 | |
264 | 264 | $message = \Swift_Message::newInstance() |
265 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getMailSubject()) |
|
265 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getMailSubject()) |
|
266 | 266 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
267 | 267 | ->setTo(array($Order->getEmail())) |
268 | 268 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | )); |
307 | 307 | |
308 | 308 | $message = \Swift_Message::newInstance() |
309 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
309 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
310 | 310 | ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName())) |
311 | 311 | ->setTo(array($Customer->getEmail())) |
312 | 312 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | )); |
351 | 351 | |
352 | 352 | $message = \Swift_Message::newInstance() |
353 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['mail_subject']) |
|
353 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['mail_subject']) |
|
354 | 354 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
355 | 355 | ->setTo(array($Order->getEmail())) |
356 | 356 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | )); |
392 | 392 | |
393 | 393 | $message = \Swift_Message::newInstance() |
394 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認') |
|
394 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認') |
|
395 | 395 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
396 | 396 | ->setTo(array($Customer->getEmail())) |
397 | 397 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | )); |
433 | 433 | |
434 | 434 | $message = \Swift_Message::newInstance() |
435 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ') |
|
435 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ') |
|
436 | 436 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
437 | 437 | ->setTo(array($Customer->getEmail())) |
438 | 438 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -952,7 +952,7 @@ |
||
952 | 952 | |
953 | 953 | // 配送日数が設定されている |
954 | 954 | if ($deliveryDurationFlag) { |
955 | - $period = new \DatePeriod ( |
|
955 | + $period = new \DatePeriod( |
|
956 | 956 | new \DateTime($minDate.' day'), |
957 | 957 | new \DateInterval('P1D'), |
958 | 958 | new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day') |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | // 配送業者のプルダウンを生成 |
68 | 68 | $builder->addEventListener( |
69 | 69 | FormEvents::PRE_SET_DATA, |
70 | - function (FormEvent $event) { |
|
70 | + function(FormEvent $event) { |
|
71 | 71 | /* @var Shipping $Shipping */ |
72 | 72 | $Shipping = $event->getData(); |
73 | 73 | if (is_null($Shipping) || !$Shipping->getId()) { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | // お届け日のプルダウンを生成 |
110 | 110 | $builder->addEventListener( |
111 | 111 | FormEvents::PRE_SET_DATA, |
112 | - function (FormEvent $event) { |
|
112 | + function(FormEvent $event) { |
|
113 | 113 | $Shipping = $event->getData(); |
114 | 114 | if (is_null($Shipping) || !$Shipping->getId()) { |
115 | 115 | return; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | // 配送日数が設定されている |
149 | 149 | if ($deliveryDurationFlag) { |
150 | - $period = new \DatePeriod ( |
|
150 | + $period = new \DatePeriod( |
|
151 | 151 | new \DateTime($minDate.' day'), |
152 | 152 | new \DateInterval('P1D'), |
153 | 153 | new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day') |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | // お届け時間のプルダウンを生成 |
176 | 176 | $builder->addEventListener( |
177 | 177 | FormEvents::PRE_SET_DATA, |
178 | - function (FormEvent $event) { |
|
178 | + function(FormEvent $event) { |
|
179 | 179 | $Shipping = $event->getData(); |
180 | 180 | if (is_null($Shipping) || !$Shipping->getId()) { |
181 | 181 | return; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | 'expanded' => false, |
47 | 47 | 'required' => false, |
48 | 48 | 'placeholder' => false, |
49 | - 'query_builder' => function (EntityRepository $er) { |
|
49 | + 'query_builder' => function(EntityRepository $er) { |
|
50 | 50 | return $er->createQueryBuilder('m') |
51 | 51 | ->orderBy('m.sort_no', 'ASC'); |
52 | 52 | }, |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | private $error = null; |
63 | 63 | private $encode = ''; |
64 | 64 | |
65 | - public function __construct(){ |
|
65 | + public function __construct() { |
|
66 | 66 | $this->encode = self::UTF; |
67 | 67 | if ('\\' === DIRECTORY_SEPARATOR) { |
68 | 68 | $this->encode = self::SJIS; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $arrFileList = $this->getFileList($app, $nowDir); |
112 | 112 | |
113 | 113 | $javascript = $this->getJsArrayList($tree); |
114 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
114 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
115 | 115 | |
116 | 116 | return [ |
117 | 117 | 'form' => $form->createView(), |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
173 | 173 | ? $this->normalizePath($request->get('now_dir')) |
174 | 174 | : $topDir; |
175 | - $fs->mkdir($nowDir . '/' . $filename); |
|
175 | + $fs->mkdir($nowDir.'/'.$filename); |
|
176 | 176 | } |
177 | 177 | } |
178 | 178 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $str = "arrTree = new Array();\n"; |
259 | 259 | foreach ($tree as $key => $val) { |
260 | - $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['sort_no'] . ','; |
|
260 | + $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['sort_no'].','; |
|
261 | 261 | if ($val['open']) { |
262 | 262 | $str .= "true);\n"; |
263 | 263 | } else { |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | private function getFileList($app, $nowDir) |
309 | 309 | { |
310 | 310 | $topDir = $this->appConfig['user_data_realdir']; |
311 | - $filter = function (\SplFileInfo $file) use ($topDir) { |
|
311 | + $filter = function(\SplFileInfo $file) use ($topDir) { |
|
312 | 312 | $acceptPath = realpath($topDir); |
313 | 313 | $targetPath = $file->getRealPath(); |
314 | 314 | return (strpos($targetPath, $acceptPath) === 0); |
@@ -172,7 +172,7 @@ |
||
172 | 172 | $entity = new $entityName(); |
173 | 173 | $sortNo = 0; |
174 | 174 | $ids = array_map( |
175 | - function ($v) { |
|
175 | + function($v) { |
|
176 | 176 | return $v['id']; |
177 | 177 | }, |
178 | 178 | $data['data'] |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | $this->app = $this->getSilexApplication(); |
54 | 54 | |
55 | - \Eccube\Util\CacheUtil::clear($this->app,$input->getOption('all')); |
|
55 | + \Eccube\Util\CacheUtil::clear($this->app, $input->getOption('all')); |
|
56 | 56 | $output->writeln(sprintf("%s <info>success</info>", 'cache:clear')); |
57 | 57 | |
58 | 58 | } |