@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | { |
66 | 66 | // install.phpのチェック. |
67 | 67 | if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) { |
68 | - $file = $app['config']['root_dir'] . '/html/install.php'; |
|
68 | + $file = $app['config']['root_dir'].'/html/install.php'; |
|
69 | 69 | if (file_exists($file)) { |
70 | 70 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'html/install.php')); |
71 | 71 | $app->addWarning($message, 'admin'); |
72 | 72 | } |
73 | - $fileOnRoot = $app['config']['root_dir'] . '/install.php'; |
|
73 | + $fileOnRoot = $app['config']['root_dir'].'/install.php'; |
|
74 | 74 | if (file_exists($fileOnRoot)) { |
75 | 75 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'install.php')); |
76 | 76 | $app->addWarning($message, 'admin'); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | t1.status |
312 | 312 | ORDER BY |
313 | 313 | t1.status'; |
314 | - $rsm = new ResultSetMapping();; |
|
314 | + $rsm = new ResultSetMapping(); ; |
|
315 | 315 | $rsm->addScalarResult('status', 'status'); |
316 | 316 | $rsm->addScalarResult('count', 'count'); |
317 | 317 | $query = $em->createNativeQuery($sql, $rsm); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ))); |
111 | 111 | |
112 | 112 | $app = $this->app; |
113 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
113 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
114 | 114 | // モーダルからのPOST時に、金額等をセットする. |
115 | 115 | if ('modal' === $app['request']->get('modal')) { |
116 | 116 | $data = $event->getData(); |
@@ -127,17 +127,13 @@ discard block |
||
127 | 127 | $data['product_name'] = $Product->getName(); |
128 | 128 | $data['product_code'] = $ProductClass->getCode(); |
129 | 129 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
130 | - $ProductClass->getClassCategory1()->getClassName() : |
|
131 | - null; |
|
130 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
132 | 131 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
133 | - $ProductClass->getClassCategory2()->getClassName() : |
|
134 | - null; |
|
132 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
135 | 133 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
136 | - $ProductClass->getClassCategory1()->getName() : |
|
137 | - null; |
|
134 | + $ProductClass->getClassCategory1()->getName() : null; |
|
138 | 135 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
139 | - $ProductClass->getClassCategory2()->getName() : |
|
140 | - null; |
|
136 | + $ProductClass->getClassCategory2()->getName() : null; |
|
141 | 137 | $data['tax_rule'] = $TaxRule->getCalcRule()->getId(); |
142 | 138 | $data['price'] = $ProductClass->getPrice02(); |
143 | 139 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ))); |
111 | 111 | |
112 | 112 | $app = $this->app; |
113 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
113 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
114 | 114 | // モーダルからのPOST時に、金額等をセットする. |
115 | 115 | if ('modal' === $app['request']->get('modal')) { |
116 | 116 | $data = $event->getData(); |
@@ -127,17 +127,13 @@ discard block |
||
127 | 127 | $data['product_name'] = $Product->getName(); |
128 | 128 | $data['product_code'] = $ProductClass->getCode(); |
129 | 129 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
130 | - $ProductClass->getClassCategory1()->getClassName() : |
|
131 | - null; |
|
130 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
132 | 131 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
133 | - $ProductClass->getClassCategory2()->getClassName() : |
|
134 | - null; |
|
132 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
135 | 133 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
136 | - $ProductClass->getClassCategory1()->getName() : |
|
137 | - null; |
|
134 | + $ProductClass->getClassCategory1()->getName() : null; |
|
138 | 135 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
139 | - $ProductClass->getClassCategory2()->getName() : |
|
140 | - null; |
|
136 | + $ProductClass->getClassCategory2()->getName() : null; |
|
141 | 137 | $data['tax_rule'] = $TaxRule->getCalcRule()->getId(); |
142 | 138 | $data['price'] = $ProductClass->getPrice02(); |
143 | 139 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
@@ -128,7 +128,7 @@ |
||
128 | 128 | $entityName = str_replace('-', '\\', $data['masterdata_name']); |
129 | 129 | $entity = new $entityName(); |
130 | 130 | $rank = 0; |
131 | - $ids = array_map(function ($v) {return $v['id'];}, $data['data']); |
|
131 | + $ids = array_map(function($v) {return $v['id']; }, $data['data']); |
|
132 | 132 | foreach ($data['data'] as $key => $value) { |
133 | 133 | if ($value['id'] !== null && $value['name'] !== null) { |
134 | 134 | $entity->setId($value['id']); |
@@ -41,28 +41,28 @@ discard block |
||
41 | 41 | public function register(BaseApplication $app) |
42 | 42 | { |
43 | 43 | // Service |
44 | - $app['eccube.service.system'] = $app->share(function () use ($app) { |
|
44 | + $app['eccube.service.system'] = $app->share(function() use ($app) { |
|
45 | 45 | return new \Eccube\Service\SystemService($app); |
46 | 46 | }); |
47 | - $app['view'] = $app->share(function () use ($app) { |
|
47 | + $app['view'] = $app->share(function() use ($app) { |
|
48 | 48 | return $app['twig']; |
49 | 49 | }); |
50 | - $app['eccube.service.cart'] = $app->share(function () use ($app) { |
|
50 | + $app['eccube.service.cart'] = $app->share(function() use ($app) { |
|
51 | 51 | return new \Eccube\Service\CartService($app); |
52 | 52 | }); |
53 | - $app['eccube.service.order'] = $app->share(function () use ($app) { |
|
53 | + $app['eccube.service.order'] = $app->share(function() use ($app) { |
|
54 | 54 | return new \Eccube\Service\OrderService($app); |
55 | 55 | }); |
56 | - $app['eccube.service.tax_rule'] = $app->share(function () use ($app) { |
|
56 | + $app['eccube.service.tax_rule'] = $app->share(function() use ($app) { |
|
57 | 57 | return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']); |
58 | 58 | }); |
59 | - $app['eccube.service.plugin'] = $app->share(function () use ($app) { |
|
59 | + $app['eccube.service.plugin'] = $app->share(function() use ($app) { |
|
60 | 60 | return new \Eccube\Service\PluginService($app); |
61 | 61 | }); |
62 | - $app['eccube.service.mail'] = $app->share(function () use ($app) { |
|
62 | + $app['eccube.service.mail'] = $app->share(function() use ($app) { |
|
63 | 63 | return new \Eccube\Service\MailService($app); |
64 | 64 | }); |
65 | - $app['eccube.service.csv.export'] = $app->share(function () use ($app) { |
|
65 | + $app['eccube.service.csv.export'] = $app->share(function() use ($app) { |
|
66 | 66 | $csvService = new \Eccube\Service\CsvExportService(); |
67 | 67 | $csvService->setEntityManager($app['orm.em']); |
68 | 68 | $csvService->setConfig($app['config']); |
@@ -74,173 +74,173 @@ discard block |
||
74 | 74 | |
75 | 75 | return $csvService; |
76 | 76 | }); |
77 | - $app['eccube.service.shopping'] = $app->share(function () use ($app) { |
|
77 | + $app['eccube.service.shopping'] = $app->share(function() use ($app) { |
|
78 | 78 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
79 | 79 | }); |
80 | 80 | |
81 | 81 | // Repository |
82 | - $app['eccube.repository.master.authority'] = $app->share(function () use ($app) { |
|
82 | + $app['eccube.repository.master.authority'] = $app->share(function() use ($app) { |
|
83 | 83 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
84 | 84 | }); |
85 | - $app['eccube.repository.master.tag'] = $app->share(function () use ($app) { |
|
85 | + $app['eccube.repository.master.tag'] = $app->share(function() use ($app) { |
|
86 | 86 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
87 | 87 | }); |
88 | - $app['eccube.repository.master.pref'] = $app->share(function () use ($app) { |
|
88 | + $app['eccube.repository.master.pref'] = $app->share(function() use ($app) { |
|
89 | 89 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
90 | 90 | }); |
91 | - $app['eccube.repository.master.sex'] = $app->share(function () use ($app) { |
|
91 | + $app['eccube.repository.master.sex'] = $app->share(function() use ($app) { |
|
92 | 92 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
93 | 93 | }); |
94 | - $app['eccube.repository.master.disp'] = $app->share(function () use ($app) { |
|
94 | + $app['eccube.repository.master.disp'] = $app->share(function() use ($app) { |
|
95 | 95 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
96 | 96 | }); |
97 | - $app['eccube.repository.master.product_type'] = $app->share(function () use ($app) { |
|
97 | + $app['eccube.repository.master.product_type'] = $app->share(function() use ($app) { |
|
98 | 98 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
99 | 99 | }); |
100 | - $app['eccube.repository.master.page_max'] = $app->share(function () use ($app) { |
|
100 | + $app['eccube.repository.master.page_max'] = $app->share(function() use ($app) { |
|
101 | 101 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
102 | 102 | }); |
103 | - $app['eccube.repository.master.order_status'] = $app->share(function () use ($app) { |
|
103 | + $app['eccube.repository.master.order_status'] = $app->share(function() use ($app) { |
|
104 | 104 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
105 | 105 | }); |
106 | - $app['eccube.repository.master.device_type'] = $app->share(function () use ($app) { |
|
106 | + $app['eccube.repository.master.device_type'] = $app->share(function() use ($app) { |
|
107 | 107 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
108 | 108 | }); |
109 | - $app['eccube.repository.master.csv_type'] = $app->share(function () use ($app) { |
|
109 | + $app['eccube.repository.master.csv_type'] = $app->share(function() use ($app) { |
|
110 | 110 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
111 | 111 | }); |
112 | 112 | |
113 | - $app['eccube.repository.delivery'] = $app->share(function () use ($app) { |
|
113 | + $app['eccube.repository.delivery'] = $app->share(function() use ($app) { |
|
114 | 114 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
115 | 115 | }); |
116 | - $app['eccube.repository.delivery_date'] = $app->share(function () use ($app) { |
|
116 | + $app['eccube.repository.delivery_date'] = $app->share(function() use ($app) { |
|
117 | 117 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
118 | 118 | }); |
119 | - $app['eccube.repository.delivery_fee'] = $app->share(function () use ($app) { |
|
119 | + $app['eccube.repository.delivery_fee'] = $app->share(function() use ($app) { |
|
120 | 120 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
121 | 121 | }); |
122 | - $app['eccube.repository.delivery_time'] = $app->share(function () use ($app) { |
|
122 | + $app['eccube.repository.delivery_time'] = $app->share(function() use ($app) { |
|
123 | 123 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
124 | 124 | }); |
125 | - $app['eccube.repository.payment'] = $app->share(function () use ($app) { |
|
125 | + $app['eccube.repository.payment'] = $app->share(function() use ($app) { |
|
126 | 126 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
127 | 127 | }); |
128 | - $app['eccube.repository.payment_option'] = $app->share(function () use ($app) { |
|
128 | + $app['eccube.repository.payment_option'] = $app->share(function() use ($app) { |
|
129 | 129 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
130 | 130 | }); |
131 | - $app['eccube.repository.category'] = $app->share(function () use ($app) { |
|
131 | + $app['eccube.repository.category'] = $app->share(function() use ($app) { |
|
132 | 132 | return $app['orm.em']->getRepository('Eccube\Entity\Category'); |
133 | 133 | }); |
134 | - $app['eccube.repository.customer'] = $app->share(function () use ($app) { |
|
134 | + $app['eccube.repository.customer'] = $app->share(function() use ($app) { |
|
135 | 135 | return $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
136 | 136 | }); |
137 | - $app['eccube.repository.news'] = $app->share(function () use ($app) { |
|
137 | + $app['eccube.repository.news'] = $app->share(function() use ($app) { |
|
138 | 138 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
139 | 139 | }); |
140 | - $app['eccube.repository.mail_history'] = $app->share(function () use ($app) { |
|
140 | + $app['eccube.repository.mail_history'] = $app->share(function() use ($app) { |
|
141 | 141 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
142 | 142 | }); |
143 | - $app['eccube.repository.member'] = $app->share(function () use ($app) { |
|
143 | + $app['eccube.repository.member'] = $app->share(function() use ($app) { |
|
144 | 144 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
145 | 145 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
146 | 146 | return $memberRepository; |
147 | 147 | }); |
148 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
148 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
149 | 149 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
150 | 150 | }); |
151 | - $app['eccube.repository.product'] = $app->share(function () use ($app) { |
|
151 | + $app['eccube.repository.product'] = $app->share(function() use ($app) { |
|
152 | 152 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
153 | 153 | return $productRepository; |
154 | 154 | }); |
155 | - $app['eccube.repository.product_image'] = $app->share(function () use ($app) { |
|
155 | + $app['eccube.repository.product_image'] = $app->share(function() use ($app) { |
|
156 | 156 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
157 | 157 | }); |
158 | - $app['eccube.repository.product_class'] = $app->share(function () use ($app) { |
|
158 | + $app['eccube.repository.product_class'] = $app->share(function() use ($app) { |
|
159 | 159 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
160 | 160 | }); |
161 | - $app['eccube.repository.product_stock'] = $app->share(function () use ($app) { |
|
161 | + $app['eccube.repository.product_stock'] = $app->share(function() use ($app) { |
|
162 | 162 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
163 | 163 | }); |
164 | - $app['eccube.repository.product_tag'] = $app->share(function () use ($app) { |
|
164 | + $app['eccube.repository.product_tag'] = $app->share(function() use ($app) { |
|
165 | 165 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
166 | 166 | }); |
167 | - $app['eccube.repository.class_name'] = $app->share(function () use ($app) { |
|
167 | + $app['eccube.repository.class_name'] = $app->share(function() use ($app) { |
|
168 | 168 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
169 | 169 | }); |
170 | - $app['eccube.repository.class_category'] = $app->share(function () use ($app) { |
|
170 | + $app['eccube.repository.class_category'] = $app->share(function() use ($app) { |
|
171 | 171 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
172 | 172 | }); |
173 | - $app['eccube.repository.customer_favorite_product'] = $app->share(function () use ($app) { |
|
173 | + $app['eccube.repository.customer_favorite_product'] = $app->share(function() use ($app) { |
|
174 | 174 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
175 | 175 | }); |
176 | - $app['eccube.repository.base_info'] = $app->share(function () use ($app) { |
|
176 | + $app['eccube.repository.base_info'] = $app->share(function() use ($app) { |
|
177 | 177 | return $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
178 | 178 | }); |
179 | - $app['eccube.repository.tax_rule'] = $app->share(function () use ($app) { |
|
179 | + $app['eccube.repository.tax_rule'] = $app->share(function() use ($app) { |
|
180 | 180 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
181 | 181 | $taxRuleRepository->setApplication($app); |
182 | 182 | |
183 | 183 | return $taxRuleRepository; |
184 | 184 | }); |
185 | - $app['eccube.repository.page_layout'] = $app->share(function () use ($app) { |
|
185 | + $app['eccube.repository.page_layout'] = $app->share(function() use ($app) { |
|
186 | 186 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
187 | 187 | $pageLayoutRepository->setApplication($app); |
188 | 188 | |
189 | 189 | return $pageLayoutRepository; |
190 | 190 | }); |
191 | - $app['eccube.repository.block'] = $app->share(function () use ($app) { |
|
191 | + $app['eccube.repository.block'] = $app->share(function() use ($app) { |
|
192 | 192 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
193 | 193 | $blockRepository->setApplication($app); |
194 | 194 | |
195 | 195 | return $blockRepository; |
196 | 196 | }); |
197 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
197 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
198 | 198 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
199 | 199 | $orderRepository->setApplication($app); |
200 | 200 | |
201 | 201 | return $orderRepository; |
202 | 202 | }); |
203 | - $app['eccube.repository.customer_address'] = $app->share(function () use ($app) { |
|
203 | + $app['eccube.repository.customer_address'] = $app->share(function() use ($app) { |
|
204 | 204 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
205 | 205 | }); |
206 | - $app['eccube.repository.shipping'] = $app->share(function () use ($app) { |
|
206 | + $app['eccube.repository.shipping'] = $app->share(function() use ($app) { |
|
207 | 207 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
208 | 208 | }); |
209 | - $app['eccube.repository.customer_status'] = $app->share(function () use ($app) { |
|
209 | + $app['eccube.repository.customer_status'] = $app->share(function() use ($app) { |
|
210 | 210 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
211 | 211 | }); |
212 | - $app['eccube.repository.order_status'] = $app->share(function () use ($app) { |
|
212 | + $app['eccube.repository.order_status'] = $app->share(function() use ($app) { |
|
213 | 213 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
214 | 214 | }); |
215 | - $app['eccube.repository.mail_template'] = $app->share(function () use ($app) { |
|
215 | + $app['eccube.repository.mail_template'] = $app->share(function() use ($app) { |
|
216 | 216 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
217 | 217 | }); |
218 | - $app['eccube.repository.csv'] = $app->share(function () use ($app) { |
|
218 | + $app['eccube.repository.csv'] = $app->share(function() use ($app) { |
|
219 | 219 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
220 | 220 | }); |
221 | - $app['eccube.repository.template'] = $app->share(function () use ($app) { |
|
221 | + $app['eccube.repository.template'] = $app->share(function() use ($app) { |
|
222 | 222 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
223 | 223 | }); |
224 | - $app['eccube.repository.authority_role'] = $app->share(function () use ($app) { |
|
224 | + $app['eccube.repository.authority_role'] = $app->share(function() use ($app) { |
|
225 | 225 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
226 | 226 | }); |
227 | 227 | |
228 | - $app['paginator'] = $app->protect(function () { |
|
228 | + $app['paginator'] = $app->protect(function() { |
|
229 | 229 | return new \Knp\Component\Pager\Paginator(); |
230 | 230 | }); |
231 | 231 | |
232 | - $app['eccube.repository.help'] = $app->share(function () use ($app) { |
|
232 | + $app['eccube.repository.help'] = $app->share(function() use ($app) { |
|
233 | 233 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
234 | 234 | }); |
235 | - $app['eccube.repository.plugin'] = $app->share(function () use ($app) { |
|
235 | + $app['eccube.repository.plugin'] = $app->share(function() use ($app) { |
|
236 | 236 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
237 | 237 | }); |
238 | - $app['eccube.repository.plugin_event_handler'] = $app->share(function () use ($app) { |
|
238 | + $app['eccube.repository.plugin_event_handler'] = $app->share(function() use ($app) { |
|
239 | 239 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
240 | 240 | }); |
241 | 241 | // em |
242 | 242 | if (isset($app['orm.em'])) { |
243 | - $app['orm.em'] = $app->share($app->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
243 | + $app['orm.em'] = $app->share($app->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
244 | 244 | // tax_rule |
245 | 245 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
246 | 246 | $taxRuleRepository->setApplication($app); |
@@ -263,13 +263,13 @@ discard block |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | // Form\Type |
266 | - $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
266 | + $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function($extensions) use ($app) { |
|
267 | 267 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
268 | 268 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
269 | 269 | |
270 | 270 | return $extensions; |
271 | 271 | })); |
272 | - $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) { |
|
272 | + $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) { |
|
273 | 273 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
274 | 274 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
275 | 275 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | if ($driver == 'pdo_sqlite') { |
109 | 109 | return sprintf("CAST(STRFTIME('%s', %s) AS INTEGER)", $this->formats[$this->field], $this->source->dispatch($sqlWalker)); |
110 | 110 | } else { |
111 | - return sprintf('EXTRACT(%s FROM %s %s)', $this->field, (string)$this->type, $this->source->dispatch($sqlWalker)); |
|
111 | + return sprintf('EXTRACT(%s FROM %s %s)', $this->field, (string) $this->type, $this->source->dispatch($sqlWalker)); |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | } |
115 | 115 | \ No newline at end of file |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | foreach ($criteria as $col => $val) { |
55 | 55 | $qb->andWhere($qb->expr()->notIn('o.'.$col, ':'.$col)) |
56 | - ->setParameter($col, (array)$val); |
|
56 | + ->setParameter($col, (array) $val); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | if (is_array($orderBy)) { |
@@ -36,6 +36,9 @@ |
||
36 | 36 | { |
37 | 37 | protected $app; |
38 | 38 | |
39 | + /** |
|
40 | + * @param \Silex\Application $app |
|
41 | + */ |
|
39 | 42 | public function __construct($app) |
40 | 43 | { |
41 | 44 | $this->app = $app; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | out('EC-CUBE3 installer use database driver of ', null, false); |
32 | 32 | |
33 | 33 | $database_driver = 'pdo_sqlite'; |
34 | -switch($argv[1]) { |
|
34 | +switch ($argv[1]) { |
|
35 | 35 | case 'mysql': |
36 | 36 | $database_driver = 'pdo_mysql'; |
37 | 37 | break; |
@@ -157,8 +157,7 @@ discard block |
||
157 | 157 | putenv('MAIL_PASS='.(getenv('MAIL_PASS') ? getenv('MAIL_PASS') : null)); |
158 | 158 | putenv('ADMIN_ROUTE='.(getenv('ADMIN_ROUTE') ? getenv('ADMIN_ROUTE') : 'admin')); |
159 | 159 | putenv('ROOT_URLPATH='.(getenv('ROOT_URLPATH') ? getenv('ROOT_URLPATH') : null)); |
160 | - putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') : |
|
161 | - substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32))); |
|
160 | + putenv('AUTH_MAGIC='.(getenv('AUTH_MAGIC') ? getenv('AUTH_MAGIC') : substr(str_replace(array('/', '+', '='), '', base64_encode(openssl_random_pseudo_bytes(32 * 2))), 0, 32))); |
|
162 | 161 | } |
163 | 162 | |
164 | 163 | function getExampleVariables() |
@@ -357,15 +356,15 @@ discard block |
||
357 | 356 | foreach ($finder as $content) { |
358 | 357 | $permission = $content->getPerms(); |
359 | 358 | // see also http://www.php.net/fileperms |
360 | - if (!($permission & 0x0010) || !($permission & 0x0002)) { |
|
359 | + if (!($permission&0x0010) || !($permission&0x0002)) { |
|
361 | 360 | $realPath = $content->getRealPath(); |
362 | 361 | if ($verbose) { |
363 | 362 | out(sprintf('%s %s to ', $realPath, substr(sprintf('%o', $permission), -4)), 'info', false); |
364 | 363 | } |
365 | - $permission = !($permission & 0x0020) ? $permission += 040 : $permission; // g+r |
|
366 | - $permission = !($permission & 0x0010) ? $permission += 020 : $permission; // g+w |
|
367 | - $permission = !($permission & 0x0004) ? $permission += 04 : $permission; // o+r |
|
368 | - $permission = !($permission & 0x0002) ? $permission += 02 : $permission; // o+w |
|
364 | + $permission = !($permission&0x0020) ? $permission += 040 : $permission; // g+r |
|
365 | + $permission = !($permission&0x0010) ? $permission += 020 : $permission; // g+w |
|
366 | + $permission = !($permission&0x0004) ? $permission += 04 : $permission; // o+r |
|
367 | + $permission = !($permission&0x0002) ? $permission += 02 : $permission; // o+w |
|
369 | 368 | $result = chmod($realPath, $permission); |
370 | 369 | if ($verbose) { |
371 | 370 | if ($result) { |
@@ -396,13 +395,13 @@ discard block |
||
396 | 395 | |
397 | 396 | function getConfig() |
398 | 397 | { |
399 | - $config = array ( |
|
398 | + $config = array( |
|
400 | 399 | 'auth_magic' => getenv('AUTH_MAGIC'), |
401 | 400 | 'password_hash_algos' => 'sha256', |
402 | 401 | 'shop_name' => getenv('SHOP_NAME'), |
403 | 402 | 'force_ssl' => NULL, |
404 | 403 | 'admin_allow_host' => |
405 | - array ( |
|
404 | + array( |
|
406 | 405 | ), |
407 | 406 | 'cookie_lifetime' => 0, |
408 | 407 | 'locale' => 'ja', |
@@ -414,9 +413,9 @@ discard block |
||
414 | 413 | |
415 | 414 | function getDatabaseConfig($database_driver) |
416 | 415 | { |
417 | - $database = array ( |
|
416 | + $database = array( |
|
418 | 417 | 'database' => |
419 | - array ( |
|
418 | + array( |
|
420 | 419 | 'driver' => $database_driver, |
421 | 420 | ) |
422 | 421 | ); |
@@ -443,9 +442,9 @@ discard block |
||
443 | 442 | |
444 | 443 | function getMailConfig() |
445 | 444 | { |
446 | - $mail = array ( |
|
445 | + $mail = array( |
|
447 | 446 | 'mail' => |
448 | - array ( |
|
447 | + array( |
|
449 | 448 | 'transport' => getenv('MAIL_BACKEND'), |
450 | 449 | 'host' => getenv('MAIL_HOST'), |
451 | 450 | 'port' => getenv('MAIL_PORT'), |