@@ -259,6 +259,9 @@ |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | |
262 | + /** |
|
263 | + * @param Application $app |
|
264 | + */ |
|
262 | 265 | private function createBody($app, $header, $footer, $Order) |
263 | 266 | { |
264 | 267 | return $app->renderView('Mail/order.twig', array( |
@@ -336,10 +336,10 @@ |
||
336 | 336 | } |
337 | 337 | } |
338 | 338 | } else { |
339 | - $filter = function ($v) { |
|
339 | + $filter = function($v) { |
|
340 | 340 | return preg_match('/^ids\d+$/', $v); |
341 | 341 | }; |
342 | - $map = function ($v) { |
|
342 | + $map = function($v) { |
|
343 | 343 | return preg_replace('/[^\d+]/', '', $v); |
344 | 344 | }; |
345 | 345 | $keys = array_keys($request->query->all()); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * @param int|null|\Eccube\Entity\ProductClass $ProductClass 商品規格 |
66 | 66 | * @param int|null|\Eccube\Entity\Master\Pref $Pref 都道府県 |
67 | 67 | * @param int|null|\Eccube\Entity\Master\Country $Country 国 |
68 | - * @return \Eccube\Entity\TaxRule 税設定情報 |
|
68 | + * @return integer 税設定情報 |
|
69 | 69 | * |
70 | 70 | * @throws NoResultException |
71 | 71 | */ |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
33 | 33 | { |
34 | 34 | if ($targetEntity->reflClass->getName() === 'Eccube\Entity\ProductClass') { |
35 | - return $targetTableAlias . '.stock >= 1 OR ' . $targetTableAlias . '.stock_unlimited = 1'; |
|
35 | + return $targetTableAlias.'.stock >= 1 OR '.$targetTableAlias.'.stock_unlimited = 1'; |
|
36 | 36 | } else { |
37 | 37 | return ""; |
38 | 38 | } |
@@ -148,7 +148,7 @@ |
||
148 | 148 | 'required' => false, |
149 | 149 | 'value' => 1, |
150 | 150 | )) |
151 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
151 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
152 | 152 | $form = $event->getForm(); |
153 | 153 | $data = $form->getData(); |
154 | 154 |
@@ -62,10 +62,10 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | if (empty($options['lastname_name'])) { |
65 | - $options['lastname_name'] = $builder->getName() . '01'; |
|
65 | + $options['lastname_name'] = $builder->getName().'01'; |
|
66 | 66 | } |
67 | 67 | if (empty($options['firstname_name'])) { |
68 | - $options['firstname_name'] = $builder->getName() . '02'; |
|
68 | + $options['firstname_name'] = $builder->getName().'02'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $builder |
@@ -274,7 +274,7 @@ |
||
274 | 274 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
275 | 275 | $qb |
276 | 276 | ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . |
277 | - 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
|
277 | + 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
|
278 | 278 | ->setParameter('multi', $multi) |
279 | 279 | ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
280 | 280 | } |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | if (isset($searchData['name']) && StringUtil::isNotBlank($searchData['name'])) { |
110 | 110 | $qb |
111 | 111 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
112 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
112 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // kana |
116 | 116 | if (isset($searchData['kana']) && StringUtil::isNotBlank($searchData['kana'])) { |
117 | 117 | $qb |
118 | 118 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
119 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
119 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $qb |
248 | 248 | ->leftJoin('o.OrderItems', 'oi') |
249 | 249 | ->andWhere('oi.product_name LIKE :buy_product_name') |
250 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
250 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | // Order By |
@@ -273,13 +273,13 @@ discard block |
||
273 | 273 | ->setParameter('order_id_start', $searchData['order_id_start']); |
274 | 274 | } |
275 | 275 | // multi |
276 | - if (isset( $searchData['multi']) && StringUtil::isNotBlank($searchData['multi'])) { |
|
276 | + if (isset($searchData['multi']) && StringUtil::isNotBlank($searchData['multi'])) { |
|
277 | 277 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
278 | 278 | $qb |
279 | - ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . |
|
279 | + ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '. |
|
280 | 280 | 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
281 | 281 | ->setParameter('multi', $multi) |
282 | - ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
|
282 | + ->setParameter('likemulti', '%'.$searchData['multi'].'%'); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | // order_id_end |
@@ -316,21 +316,21 @@ discard block |
||
316 | 316 | if (isset($searchData['name']) && StringUtil::isNotBlank($searchData['name'])) { |
317 | 317 | $qb |
318 | 318 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
319 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
319 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | // kana |
323 | 323 | if (isset($searchData['kana']) && StringUtil::isNotBlank($searchData['kana'])) { |
324 | 324 | $qb |
325 | 325 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
326 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
326 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | |
330 | 330 | if (isset($searchData['email']) && StringUtil::isNotBlank($searchData['email'])) { |
331 | 331 | $qb |
332 | 332 | ->andWhere('o.email like :email') |
333 | - ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
333 | + ->setParameter('email', '%'.$searchData['email'].'%'); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | // tel |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $tel = preg_replace('/[^0-9]/ ', '', $searchData['tel']); |
339 | 339 | $qb |
340 | 340 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
341 | - ->setParameter('tel', '%' . $tel . '%'); |
|
341 | + ->setParameter('tel', '%'.$tel.'%'); |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | // sex |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | $qb |
443 | 443 | ->leftJoin('o.OrderItems', 'oi') |
444 | 444 | ->andWhere('oi.product_name LIKE :buy_product_name') |
445 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
445 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
446 | 446 | } |
447 | 447 | |
448 | 448 | // Order By |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | if(PluginEventHandler::EVENT_HANDLER_TYPE_FIRST==$type){ |
56 | 56 | $range_start=PluginEventHandler::EVENT_PRIORITY_FIRST_START; |
57 | 57 | $range_end=PluginEventHandler::EVENT_PRIORITY_FIRST_END; |
58 | - }elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){ |
|
58 | + } elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){ |
|
59 | 59 | $range_start=PluginEventHandler::EVENT_PRIORITY_LAST_START; |
60 | 60 | $range_end=PluginEventHandler::EVENT_PRIORITY_LAST_END; |
61 | - }else{ |
|
61 | + } else{ |
|
62 | 62 | $range_start=PluginEventHandler::EVENT_PRIORITY_NORMAL_START; |
63 | 63 | $range_end=PluginEventHandler::EVENT_PRIORITY_NORMAL_END; |
64 | 64 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $result=$qb->getQuery()->getResult(); |
83 | 83 | if(count($result)){ |
84 | 84 | return $result[0]->getPriority() -1; |
85 | - }else{ |
|
85 | + } else{ |
|
86 | 86 | return $range_start; |
87 | 87 | } |
88 | 88 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $em->flush(); |
120 | 120 | $em->getConnection()->commit(); |
121 | 121 | # 移動する |
122 | - }else{ |
|
122 | + } else{ |
|
123 | 123 | # 移動しない |
124 | 124 | throw new PluginException("Can't swap"); |
125 | 125 | } |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | |
74 | 74 | $qb = $this->createQueryBuilder('e'); |
75 | 75 | $qb->andWhere("e.priority >= $range_end ") |
76 | - ->andWhere("e.priority <= $range_start ") |
|
77 | - ->andWhere('e.event = :event') |
|
78 | - ->setParameter('event',$event) |
|
79 | - ->setMaxResults(1) |
|
80 | - ->orderBy('e.priority','ASC'); |
|
76 | + ->andWhere("e.priority <= $range_start ") |
|
77 | + ->andWhere('e.event = :event') |
|
78 | + ->setParameter('event',$event) |
|
79 | + ->setMaxResults(1) |
|
80 | + ->orderBy('e.priority','ASC'); |
|
81 | 81 | |
82 | 82 | $result=$qb->getQuery()->getResult(); |
83 | 83 | if(count($result)){ |
84 | - return $result[0]->getPriority() -1; |
|
84 | + return $result[0]->getPriority() -1; |
|
85 | 85 | }else{ |
86 | - return $range_start; |
|
86 | + return $range_start; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | } |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | $qb = $this->createQueryBuilder('e'); |
97 | 97 | |
98 | 98 | $qb->andWhere("e.priority >= $range_end ") |
99 | - ->andWhere("e.priority <= $range_start ") |
|
100 | - ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
101 | - ->andWhere('e.event = :event') |
|
102 | - ->setParameter('event',$pluginEventHandler->getEvent()) |
|
103 | - ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
104 | - ->setMaxResults(1) |
|
105 | - ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
99 | + ->andWhere("e.priority <= $range_start ") |
|
100 | + ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
101 | + ->andWhere('e.event = :event') |
|
102 | + ->setParameter('event',$pluginEventHandler->getEvent()) |
|
103 | + ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
104 | + ->setMaxResults(1) |
|
105 | + ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
106 | 106 | |
107 | 107 | $result=$qb->getQuery()->getResult(); |
108 | 108 |
@@ -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 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if ($this->config['auth_type'] == 'PLAIN') { |
54 | 54 | $res = $raw; |
55 | 55 | } else { |
56 | - $res = hash_hmac($this->config['password_hash_algos'], $raw . ':' . $this->config['auth_magic'], $salt); |
|
56 | + $res = hash_hmac($this->config['password_hash_algos'], $raw.':'.$this->config['auth_magic'], $salt); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | return $res; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } else { |
82 | 82 | // 旧バージョン(2.11未満)からの移行を考慮 |
83 | 83 | if (empty($salt)) { |
84 | - $hash = sha1($raw . ':' . $this->config['auth_magic']); |
|
84 | + $hash = sha1($raw.':'.$this->config['auth_magic']); |
|
85 | 85 | } else { |
86 | 86 | $hash = $this->encodePassword($raw, $salt); |
87 | 87 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | 'label' => '拒否URL', |
60 | 60 | 'required' => false, |
61 | 61 | )) |
62 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
62 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
63 | 63 | $form = $event->getForm(); |
64 | 64 | |
65 | 65 | $Authority = $form['Authority']->getData(); |