@@ -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,14 +96,14 @@ 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.del_flg = 0 ") |
|
101 | - ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
102 | - ->andWhere('e.event = :event') |
|
103 | - ->setParameter('event',$pluginEventHandler->getEvent()) |
|
104 | - ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
105 | - ->setMaxResults(1) |
|
106 | - ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
99 | + ->andWhere("e.priority <= $range_start ") |
|
100 | + ->andWhere("e.del_flg = 0 ") |
|
101 | + ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
102 | + ->andWhere('e.event = :event') |
|
103 | + ->setParameter('event',$pluginEventHandler->getEvent()) |
|
104 | + ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
105 | + ->setMaxResults(1) |
|
106 | + ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
107 | 107 | |
108 | 108 | $result=$qb->getQuery()->getResult(); |
109 | 109 |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | $qb = $this->createQueryBuilder('e') |
43 | 43 | ->innerJoin('e.Plugin', 'p') |
44 | 44 | ->andWhere('e.del_flg = 0 ') |
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,66 +52,66 @@ 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 | 100 | ->andWhere("e.del_flg = 0 ") |
101 | - ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
101 | + ->andWhere('e.priority '.($up ? '>' : '<').' :pri') |
|
102 | 102 | ->andWhere('e.event = :event') |
103 | - ->setParameter('event',$pluginEventHandler->getEvent()) |
|
104 | - ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
103 | + ->setParameter('event', $pluginEventHandler->getEvent()) |
|
104 | + ->setParameter('pri', $pluginEventHandler->getPriority()) |
|
105 | 105 | ->setMaxResults(1) |
106 | - ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
106 | + ->orderBy('e.priority', ($up ? 'ASC' : 'DESC')); |
|
107 | 107 | |
108 | - $result=$qb->getQuery()->getResult(); |
|
108 | + $result = $qb->getQuery()->getResult(); |
|
109 | 109 | |
110 | - if(count($result)){ |
|
111 | - $em =$this->getEntityManager(); |
|
110 | + if (count($result)) { |
|
111 | + $em = $this->getEntityManager(); |
|
112 | 112 | $em->getConnection()->beginTransaction(); |
113 | 113 | // 2個のentityのprioriryを入れ替える |
114 | - $tmp=$pluginEventHandler->getPriority(); |
|
114 | + $tmp = $pluginEventHandler->getPriority(); |
|
115 | 115 | $pluginEventHandler->setPriority($result[0]->getPriority()); |
116 | 116 | $result[0]->setPriority($tmp); |
117 | 117 | $em->persist($result[0]); |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | /** |
@@ -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(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | public function __construct(Application $app) |
38 | 38 | { |
39 | - $this->app = $app; |
|
39 | + $this->app = $app; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function supportsAttribute($attribute) |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | { |
308 | 308 | $config = $this->config; |
309 | 309 | |
310 | - return function ($value) use ($config) { |
|
310 | + return function($value) use ($config) { |
|
311 | 311 | return mb_convert_encoding( |
312 | 312 | (string) $value, $config['csv_export_encoding'], 'UTF-8' |
313 | 313 | ); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | if ($Conditions instanceof ArrayCollection) { |
432 | 432 | $Conditions = new ArrayCollection( |
433 | 433 | array_map( |
434 | - function ($Entity) use ($em) { |
|
434 | + function($Entity) use ($em) { |
|
435 | 435 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
436 | 436 | }, $Conditions->toArray() |
437 | 437 | ) |
@@ -325,7 +325,6 @@ discard block |
||
325 | 325 | |
326 | 326 | /** |
327 | 327 | * @param $row |
328 | - * @param null $callback |
|
329 | 328 | */ |
330 | 329 | public function fputcsv($row) |
331 | 330 | { |
@@ -424,7 +423,6 @@ discard block |
||
424 | 423 | * XXX self::setExportQueryBuilder() をコールする前に EntityManager を取得したいので、引数で渡している |
425 | 424 | * |
426 | 425 | * @param array $searchData セッションから取得した検索条件の配列 |
427 | - * @param EntityManager $em |
|
428 | 426 | */ |
429 | 427 | protected function findDeserializeObjects(array &$searchData) |
430 | 428 | { |
@@ -88,7 +88,7 @@ |
||
88 | 88 | ->setCompanyName($Customer->getCompanyName()) |
89 | 89 | ->setZip01($Customer->getZip01()) |
90 | 90 | ->setZip02($Customer->getZip02()) |
91 | - ->setZipcode($Customer->getZip01() . $Customer->getZip02()) |
|
91 | + ->setZipcode($Customer->getZip01().$Customer->getZip02()) |
|
92 | 92 | ->setPref($Customer->getPref()) |
93 | 93 | ->setAddr01($Customer->getAddr01()) |
94 | 94 | ->setAddr02($Customer->getAddr02()) |
@@ -35,7 +35,6 @@ |
||
35 | 35 | use Eccube\Repository\CustomerRepository; |
36 | 36 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
37 | 37 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
38 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
39 | 38 | use Symfony\Component\EventDispatcher\EventDispatcher; |
40 | 39 | use Symfony\Component\Form\FormFactory; |
41 | 40 | use Symfony\Component\HttpFoundation\Request; |
@@ -138,7 +138,7 @@ |
||
138 | 138 | 'allow_add' => true, |
139 | 139 | 'allow_delete' => true, |
140 | 140 | 'data' => $ProductClasses, |
141 | - )); |
|
141 | + )); |
|
142 | 142 | |
143 | 143 | $event = new EventArgs( |
144 | 144 | array( |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $class2Valied = $this->isValiedCategory($ClassName2); |
107 | 107 | |
108 | 108 | // 規格が選択されていないか、選択された状態で分類が保有されていれば、画面表示 |
109 | - if($class1Valied && $class2Valied){ |
|
109 | + if ($class1Valied && $class2Valied) { |
|
110 | 110 | $hasClassCategoryFlg = true; |
111 | 111 | } |
112 | 112 |
@@ -529,6 +529,9 @@ discard block |
||
529 | 529 | /** |
530 | 530 | * 登録、更新時のエラー画面表示 |
531 | 531 | * |
532 | + * @param Application $app |
|
533 | + * @param boolean $not_product_class |
|
534 | + * @param \Symfony\Component\Form\FormInterface $classForm |
|
532 | 535 | */ |
533 | 536 | protected function render($app, $Product, $ProductClass, $not_product_class, $classForm, $error = null) |
534 | 537 | { |
@@ -580,6 +583,7 @@ discard block |
||
580 | 583 | |
581 | 584 | /** |
582 | 585 | * 規格1と規格2を組み合わせた商品規格を作成 |
586 | + * @param Application $app |
|
583 | 587 | */ |
584 | 588 | private function createProductClasses($app, Product $Product, ClassName $ClassName1 = null, ClassName $ClassName2 = null) |
585 | 589 | { |
@@ -667,6 +671,7 @@ discard block |
||
667 | 671 | * |
668 | 672 | * @param $productClassDest コピー先となる商品規格 |
669 | 673 | * @param $productClassOrig コピー元となる商品規格 |
674 | + * @param Application $app |
|
670 | 675 | */ |
671 | 676 | private function setDefualtProductClass($app, $productClassDest, $productClassOrig) { |
672 | 677 | $productClassDest->setDeliveryDate($productClassOrig->getDeliveryDate()); |
@@ -46,7 +46,6 @@ |
||
46 | 46 | use Eccube\Repository\TaxRuleRepository; |
47 | 47 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
48 | 48 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
49 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
50 | 49 | use Symfony\Bridge\Doctrine\Form\Type\EntityType; |
51 | 50 | use Symfony\Component\EventDispatcher\EventDispatcher; |
52 | 51 | use Symfony\Component\Form\Extension\Core\Type\CollectionType; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Returns a list of functions to add to the existing list. |
42 | 42 | * |
43 | - * @return array An array of functions |
|
43 | + * @return \Twig_SimpleFunction[] An array of functions |
|
44 | 44 | */ |
45 | 45 | public function getFunctions() |
46 | 46 | { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * Returns a list of filters. |
63 | 63 | * |
64 | - * @return array |
|
64 | + * @return \Twig_SimpleFilter[] |
|
65 | 65 | */ |
66 | 66 | public function getFilters() |
67 | 67 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if (is_callable($function)) { |
69 | 69 | return call_user_func_array($function, $arg_list); |
70 | 70 | } |
71 | - trigger_error('Called to an undefined function : php_'. $function, E_USER_WARNING); |
|
71 | + trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING); |
|
72 | 72 | |
73 | 73 | }, ['pre_escape' => 'html', 'is_safe' => ['html']]), |
74 | 74 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function getCsrfTokenForAnchor() |
157 | 157 | { |
158 | 158 | $token = $this->app['csrf.token_manager']->getToken(Constant::TOKEN_NAME)->getValue(); |
159 | - return 'token-for-anchor=\'' . $token . '\''; |
|
159 | + return 'token-for-anchor=\''.$token.'\''; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |