@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | // ファイル生成・更新 |
114 | 114 | $tplDir = $app['config']['block_realdir']; |
115 | 115 | |
116 | - $filePath = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
116 | + $filePath = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
117 | 117 | |
118 | 118 | $fs = new Filesystem(); |
119 | 119 | $fs->dumpFile($filePath, $form->get('block_html')->getData()); |
120 | 120 | // 更新でファイル名を変更した場合、以前のファイルを削除 |
121 | 121 | if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) { |
122 | - $oldFilePath = $tplDir . '/' . $previous_filename . '.twig'; |
|
122 | + $oldFilePath = $tplDir.'/'.$previous_filename.'.twig'; |
|
123 | 123 | if ($fs->exists($oldFilePath)) { |
124 | 124 | $fs->remove($oldFilePath); |
125 | 125 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る |
172 | 172 | if ($Block->getDeletableFlg() > 0) { |
173 | 173 | $tplDir = $app['config']['block_realdir']; |
174 | - $file = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
174 | + $file = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
175 | 175 | $fs = new Filesystem(); |
176 | 176 | if ($fs->exists($file)) { |
177 | 177 | $fs->remove($file); |
@@ -102,7 +102,7 @@ |
||
102 | 102 | if (count($allowHost) > 0) { |
103 | 103 | $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost))); |
104 | 104 | } |
105 | - $form->get('force_ssl')->setData((bool)$app['config']['force_ssl']); |
|
105 | + $form->get('force_ssl')->setData((bool) $app['config']['force_ssl']); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return $app->render('Setting/System/security.twig', array( |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | // path.ymlの更新 |
23 | 23 | $app = Application::getInstance(); |
24 | - $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml'; |
|
24 | + $file = $app['config']['root_dir'].'/app/config/eccube/path.yml'; |
|
25 | 25 | $config = Yaml::parse(file_get_contents($file)); |
26 | 26 | |
27 | 27 | if (!array_key_exists('public_path', $config)) { |
@@ -27,7 +27,6 @@ |
||
27 | 27 | use Symfony\Component\Form\AbstractType; |
28 | 28 | use Symfony\Component\Form\Extension\Core\Type; |
29 | 29 | use Symfony\Component\Form\FormBuilderInterface; |
30 | -use Symfony\Component\Validator\Constraints as Assert; |
|
31 | 30 | |
32 | 31 | class SearchProductType extends AbstractType |
33 | 32 | { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | if ($dir == 'doctrine') { |
60 | 60 | // doctrineが指定された場合は, cache driver経由で削除. |
61 | - $config = $app['orm.em']->getConfiguration(); |
|
61 | + $config = $app['orm.em']->getConfiguration(); |
|
62 | 62 | $this->deleteDoctrineCache($config->getMetadataCacheImpl()); |
63 | 63 | $this->deleteDoctrineCache($config->getQueryCacheImpl()); |
64 | 64 | $this->deleteDoctrineCache($config->getResultCacheImpl()); |
@@ -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; |
@@ -25,8 +25,6 @@ |
||
25 | 25 | |
26 | 26 | use Symfony\Component\Form\AbstractType; |
27 | 27 | use Symfony\Component\Form\FormBuilderInterface; |
28 | -use Symfony\Component\Form\FormError; |
|
29 | -use Symfony\Component\Form\FormEvents; |
|
30 | 28 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
31 | 29 | use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; |
32 | 30 | use Symfony\Component\Validator\Constraints as Assert; |
@@ -234,13 +234,13 @@ discard block |
||
234 | 234 | '\Eccube\Entity\Customer' |
235 | 235 | ))); |
236 | 236 | |
237 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
237 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
238 | 238 | |
239 | 239 | $data = $event->getData(); |
240 | 240 | $orderDetails = &$data['OrderDetails']; |
241 | 241 | |
242 | 242 | // 数量0フィルター |
243 | - $quantityFilter = function ($v) { |
|
243 | + $quantityFilter = function($v) { |
|
244 | 244 | return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity']))); |
245 | 245 | }; |
246 | 246 | |
@@ -249,10 +249,9 @@ discard block |
||
249 | 249 | $shippings = &$data['Shippings']; |
250 | 250 | |
251 | 251 | // 数量を抽出 |
252 | - $getQuantity = function ($v) { |
|
252 | + $getQuantity = function($v) { |
|
253 | 253 | return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ? |
254 | - trim($v['quantity']) : |
|
255 | - 0; |
|
254 | + trim($v['quantity']) : 0; |
|
256 | 255 | }; |
257 | 256 | |
258 | 257 | foreach ($shippings as &$shipping) { |
@@ -268,7 +267,7 @@ discard block |
||
268 | 267 | $orderDetail['quantity'] = 0; |
269 | 268 | |
270 | 269 | // 受注詳細と同じ商品規格のみ抽出 |
271 | - $productClassFilter = function ($v) use ($orderDetail) { |
|
270 | + $productClassFilter = function($v) use ($orderDetail) { |
|
272 | 271 | return $orderDetail['ProductClass'] === $v['ProductClass']; |
273 | 272 | }; |
274 | 273 | |
@@ -277,10 +276,9 @@ discard block |
||
277 | 276 | if (!empty($shipping['ShipmentItems'])) { |
278 | 277 | |
279 | 278 | // 同じ商品規格の受注詳細の価格を適用 |
280 | - $applyPrice = function (&$v) use ($orderDetail) { |
|
279 | + $applyPrice = function(&$v) use ($orderDetail) { |
|
281 | 280 | $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ? |
282 | - $orderDetail['price'] : |
|
283 | - $v['price']; |
|
281 | + $orderDetail['price'] : $v['price']; |
|
284 | 282 | }; |
285 | 283 | array_walk($shipping['ShipmentItems'], $applyPrice); |
286 | 284 | |
@@ -300,7 +298,7 @@ discard block |
||
300 | 298 | |
301 | 299 | $event->setData($data); |
302 | 300 | }); |
303 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
301 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
304 | 302 | $form = $event->getForm(); |
305 | 303 | $orderDetails = $form['OrderDetails']->getData(); |
306 | 304 | if (empty($orderDetails) || count($orderDetails) < 1) { |
@@ -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']; |