Completed
Pull Request — master (#2152)
by NOBU
82:06 queued 38:49
created
src/Eccube/Resource/doctrine/migration/Version20160413151321.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Eccube/Service/CartService.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     }
232 232
 
233 233
     /**
234
-     * @param  \Eccube\Entity\ProductClass|integer $ProductClass
234
+     * @param  string $ProductClass
235 235
      * @param  integer $quantity
236 236
      * @return \Eccube\Service\CartService
237 237
      * @throws CartException
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
      * 在庫数と販売制限数ともに個数が超えていれば、少ない方を適用させてメッセージを表示する
645 645
      *
646 646
      * @param ProductClass $ProductClass
647
-     * @param $productName
647
+     * @param string $productName
648 648
      * @param $quantity
649 649
      * @return int|string
650 650
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function getProductQuantity($productClassId)
224 224
     {
225
-        $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId);
225
+        $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId);
226 226
         if ($CartItem) {
227 227
             return $CartItem->getQuantity();
228 228
         } else {
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         $CartItem = new CartItem();
306 306
         $CartItem
307 307
             ->setClassName('Eccube\Entity\ProductClass')
308
-            ->setClassId((string)$ProductClass->getId())
308
+            ->setClassId((string) $ProductClass->getId())
309 309
             ->setPrice($ProductClass->getPrice02IncTax())
310 310
             ->setQuantity($quantity);
311 311
 
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
      */
462 462
     public function removeProduct($productClassId)
463 463
     {
464
-        $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId);
464
+        $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId);
465 465
 
466 466
         // 支払方法の再設定
467 467
         if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/SearchProductType.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/CacheController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ChangePasswordType.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
 {
36 36
     private $app;
37 37
 
38
+    /**
39
+     * @param \Silex\Application $app
40
+     */
38 41
     public function __construct($app)
39 42
     {
40 43
         $this->app = $app;
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderType.php 1 patch
Spacing   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/AdminController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShipmentItemType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 )));
98 98
 
99 99
         $app = $this->app;
100
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
100
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
101 101
             // モーダルからのPOST時に、金額等をセットする.
102 102
             if ('modal' === $app['request']->get('modal')) {
103 103
                 $data = $event->getData();
@@ -112,17 +112,13 @@  discard block
 block discarded – undo
112 112
                     $data['product_name'] = $Product->getName();
113 113
                     $data['product_code'] = $ProductClass->getCode();
114 114
                     $data['class_name1'] = $ProductClass->hasClassCategory1() ?
115
-                        $ProductClass->getClassCategory1()->getClassName() :
116
-                        null;
115
+                        $ProductClass->getClassCategory1()->getClassName() : null;
117 116
                     $data['class_name2'] = $ProductClass->hasClassCategory2() ?
118
-                        $ProductClass->getClassCategory2()->getClassName() :
119
-                        null;
117
+                        $ProductClass->getClassCategory2()->getClassName() : null;
120 118
                     $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
121
-                        $ProductClass->getClassCategory1()->getName() :
122
-                        null;
119
+                        $ProductClass->getClassCategory1()->getName() : null;
123 120
                     $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
124
-                        $ProductClass->getClassCategory2()->getName() :
125
-                        null;
121
+                        $ProductClass->getClassCategory2()->getName() : null;
126 122
                     $data['price'] = $ProductClass->getPrice02();
127 123
                     $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
128 124
                     $event->setData($data);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderDetailType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.