Completed
Push — experimental/3.1 ( 84fe04...c312fa )
by Yangsin
25s
created
src/Eccube/Controller/Admin/Product/ProductController.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -792,6 +792,7 @@
 block discarded – undo
792 792
      * ProductCategory作成
793 793
      * @param \Eccube\Entity\Product $Product
794 794
      * @param \Eccube\Entity\Category $Category
795
+     * @param integer $count
795 796
      * @return \Eccube\Entity\ProductCategory
796 797
      */
797 798
     private function createProductCategory($Product, $Category, $count)
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                     }
204 204
 
205 205
                     $extension = $image->getClientOriginalExtension();
206
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
206
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
207 207
                     $image->move($app['config']['image_temp_realdir'], $filename);
208 208
                     $files[] = $filename;
209 209
                 }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         $form = $builder->getForm();
280 280
 
281 281
         if (!$has_class) {
282
-            $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited());
282
+            $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited());
283 283
             $form['class']->setData($ProductClass);
284 284
         }
285 285
 
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
                 $Categories = $form->get('Category')->getData();
366 366
                 $categoriesIdList = array();
367 367
                 foreach ($Categories as $Category) {
368
-                    foreach($Category->getPath() as $ParentCategory){
369
-                        if (!isset($categoriesIdList[$ParentCategory->getId()])){
368
+                    foreach ($Category->getPath() as $ParentCategory) {
369
+                        if (!isset($categoriesIdList[$ParentCategory->getId()])) {
370 370
                             $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count);
371 371
                             $app['orm.em']->persist($ProductCategory);
372 372
                             $count++;
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                             $categoriesIdList[$ParentCategory->getId()] = true;
376 376
                         }
377 377
                     }
378
-                    if (!isset($categoriesIdList[$Category->getId()])){
378
+                    if (!isset($categoriesIdList[$Category->getId()])) {
379 379
                         $ProductCategory = $this->createProductCategory($Product, $Category, $count);
380 380
                         $app['orm.em']->persist($ProductCategory);
381 381
                         $count++;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                     $app['orm.em']->persist($ProductImage);
398 398
 
399 399
                     // 移動
400
-                    $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image);
400
+                    $file = new File($app['config']['image_temp_realdir'].'/'.$add_image);
401 401
                     $file->move($app['config']['image_save_realdir']);
402 402
                 }
403 403
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
                     // 削除
419 419
                     $fs = new Filesystem();
420
-                    $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image);
420
+                    $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image);
421 421
                 }
422 422
                 $app['orm.em']->persist($Product);
423 423
                 $app['orm.em']->flush();
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
                 foreach ($deleteImages as $deleteImage) {
578 578
                     try {
579 579
                         $fs = new Filesystem();
580
-                        $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage);
580
+                        $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage);
581 581
                     } catch (\Exception $e) {
582 582
                         // エラーが発生しても無視する
583 583
                     }
@@ -647,10 +647,10 @@  discard block
 block discarded – undo
647 647
 
648 648
                     // 画像ファイルを新規作成
649 649
                     $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION);
650
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
650
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
651 651
                     try {
652 652
                         $fs = new Filesystem();
653
-                        $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename);
653
+                        $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename);
654 654
                     } catch (\Exception $e) {
655 655
                         // エラーが発生しても無視する
656 656
                     }
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
         $em->getConfiguration()->setSQLLogger(null);
726 726
 
727 727
         $response = new StreamedResponse();
728
-        $response->setCallback(function () use ($app, $request) {
728
+        $response->setCallback(function() use ($app, $request) {
729 729
 
730 730
             // CSV種別を元に初期化.
731 731
             $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT);
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
             // データ行の出力.
766 766
             $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
767 767
 
768
-            $app['eccube.service.csv.export']->exportData(function ($entity, CsvExportService $csvService) use ($app, $request) {
768
+            $app['eccube.service.csv.export']->exportData(function($entity, CsvExportService $csvService) use ($app, $request) {
769 769
                 $Csvs = $csvService->getCsvs();
770 770
 
771 771
                 /** @var $Product \Eccube\Entity\Product */
@@ -808,9 +808,9 @@  discard block
 block discarded – undo
808 808
         });
809 809
 
810 810
         $now = new \DateTime();
811
-        $filename = 'product_' . $now->format('YmdHis') . '.csv';
811
+        $filename = 'product_'.$now->format('YmdHis').'.csv';
812 812
         $response->headers->set('Content-Type', 'application/octet-stream');
813
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
813
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
814 814
         $response->send();
815 815
 
816 816
         log_info('商品CSV出力ファイル名', array($filename));
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/Strategy/ShippingStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
         // 送料をすべて足す
22 22
         $delivery_fee_total = array_reduce(
23 23
             array_map(
24
-                function ($Shipping) {
24
+                function($Shipping) {
25 25
                     return $Shipping->getShippingDeliveryFee();
26 26
                 },
27 27
                 $this->Order->getShippings()->toArray()
28 28
             ),
29
-            function ($carry, $item) {
29
+            function($carry, $item) {
30 30
                 return $carry += $item;
31 31
             }
32 32
         );
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/CalculateContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             $Strategy->execute($this->OrderDetails);
19 19
         }
20 20
 
21
-        foreach($this->OrderDetails as $OrderDetail) {
21
+        foreach ($this->OrderDetails as $OrderDetail) {
22 22
             if (!$this->Order->getOrderDetails()->contains($OrderDetail)) {
23 23
                 $OrderDetail->setOrder($this->Order);
24 24
                 $this->Order->addOrderDetail($OrderDetail);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Shopping/ShippingType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         // 配送業者のプルダウンを生成
55 55
         $builder->addEventListener(
56 56
             FormEvents::PRE_SET_DATA,
57
-            function (FormEvent $event) {
57
+            function(FormEvent $event) {
58 58
                 $Shipping = $event->getData();
59 59
                 if (is_null($Shipping) || !$Shipping->getId()) {
60 60
                     return;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         // お届け日のプルダウンを生成
96 96
         $builder->addEventListener(
97 97
             FormEvents::PRE_SET_DATA,
98
-            function (FormEvent $event) {
98
+            function(FormEvent $event) {
99 99
                 $Shipping = $event->getData();
100 100
                 if (is_null($Shipping) || !$Shipping->getId()) {
101 101
                     return;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
                 // 配送日数が設定されている
133 133
                 if ($deliveryDateFlag) {
134
-                    $period = new \DatePeriod (
134
+                    $period = new \DatePeriod(
135 135
                         new \DateTime($minDate.' day'),
136 136
                         new \DateInterval('P1D'),
137 137
                         new \DateTime($minDate + $this->config['deliv_date_end_max'].' day')
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         // お届け時間のプルダウンを生成
160 160
         $builder->addEventListener(
161 161
             FormEvents::PRE_SET_DATA,
162
-            function (FormEvent $event) {
162
+            function(FormEvent $event) {
163 163
                 $Shipping = $event->getData();
164 164
                 if (is_null($Shipping) || !$Shipping->getId()) {
165 165
                     return;
Please login to merge, or discard this patch.
src/Eccube/InstallApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         if (is_writable($logDir)) {
41 41
             if (file_exists($installLog) && !is_writable($installLog)) {
42
-                die($installLog . ' の書込権限を変更して下さい。');
42
+                die($installLog.' の書込権限を変更して下さい。');
43 43
             }
44 44
             // install step2 でログディレクトリに書き込み権限が付与されればログ出力を開始する.
45 45
             $app->register(new \Silex\Provider\MonologServiceProvider(), array(
Please login to merge, or discard this patch.
src/Eccube/Service/MailService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
      * Send order mail.
230 230
      *
231 231
      * @param \Eccube\Entity\Order $Order 受注情報
232
-     * @return string
232
+     * @return \Swift_Mime_MimePart
233 233
      */
234 234
     public function sendOrderMail(\Eccube\Entity\Order $Order)
235 235
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         ));
62 62
 
63 63
         $message = \Swift_Message::newInstance()
64
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
64
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
65 65
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
66 66
             ->setTo(array($Customer->getEmail()))
67 67
             ->setBcc($this->BaseInfo->getEmail01())
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         ));
103 103
 
104 104
         $message = \Swift_Message::newInstance()
105
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。')
105
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。')
106 106
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
107 107
             ->setTo(array($Customer->getEmail()))
108 108
             ->setBcc($this->BaseInfo->getEmail01())
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         ));
145 145
 
146 146
         $message = \Swift_Message::newInstance()
147
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了')
147
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了')
148 148
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
149 149
             ->setTo(array($email))
150 150
             ->setBcc($this->BaseInfo->getEmail01())
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         // 問い合わせ者にメール送信
189 189
         $message = \Swift_Message::newInstance()
190
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。')
190
+            ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。')
191 191
             ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName()))
192 192
             ->setTo(array($formData['email']))
193 193
             ->setBcc($this->BaseInfo->getEmail02())
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         ));
245 245
 
246 246
         $message = \Swift_Message::newInstance()
247
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getSubject())
247
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getSubject())
248 248
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
249 249
             ->setTo(array($Order->getEmail()))
250 250
             ->setBcc($this->BaseInfo->getEmail01())
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         ));
289 289
 
290 290
         $message = \Swift_Message::newInstance()
291
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
291
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
292 292
             ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName()))
293 293
             ->setTo(array($Customer->getEmail()))
294 294
             ->setBcc($this->BaseInfo->getEmail01())
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         ));
333 333
 
334 334
         $message = \Swift_Message::newInstance()
335
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['subject'])
335
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['subject'])
336 336
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
337 337
             ->setTo(array($Order->getEmail()))
338 338
             ->setBcc($this->BaseInfo->getEmail01())
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         ));
374 374
 
375 375
         $message = \Swift_Message::newInstance()
376
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認')
376
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認')
377 377
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
378 378
             ->setTo(array($Customer->getEmail()))
379 379
             ->setBcc($this->BaseInfo->getEmail01())
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         ));
415 415
 
416 416
         $message = \Swift_Message::newInstance()
417
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')
417
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ')
418 418
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
419 419
             ->setTo(array($Customer->getEmail()))
420 420
             ->setBcc($this->BaseInfo->getEmail01())
Please login to merge, or discard this patch.
src/Eccube/Controller/ShoppingController.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -1360,7 +1360,6 @@
 block discarded – undo
1360 1360
     /**
1361 1361
      * フォームの情報からお届け先のインデックスを返す
1362 1362
      *
1363
-     * @param Application $app
1364 1363
      * @param mixed $CustomerAddressData
1365 1364
      * @return int
1366 1365
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1336,7 +1336,7 @@
 block discarded – undo
1336 1336
                 // ステータス履歴も保持しておく? 在庫引き当ての仕様もセットで。
1337 1337
                 if ($dispatcher instanceof Response
1338 1338
                     && ($dispatcher->isRedirection() || $dispatcher->getContent())) { // $paymentMethod->apply() が Response を返した場合は画面遷移
1339
-                    return $dispatcher;                // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
1339
+                    return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
1340 1340
                 }
1341 1341
                 $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行
1342 1342
                 if (!$PaymentResult->isSuccess()) {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -40,9 +40,7 @@
 block discarded – undo
40 40
 use Eccube\Form\Type\ShippingMultipleType;
41 41
 use Eccube\Form\Type\Shopping\OrderType;
42 42
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
43
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
44 43
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
45
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
46 44
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
47 45
 use Symfony\Component\Form\Extension\Core\Type\CollectionType;
48 46
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
src/Eccube/Repository/CustomerRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
             $qb
154 154
                 ->andWhere('c.id = :customer_id OR CONCAT(c.name01, c.name02) LIKE :name OR CONCAT(c.kana01, c.kana02) LIKE :kana OR c.email LIKE :email')
155 155
                 ->setParameter('customer_id', $id)
156
-                ->setParameter('name', '%' . $clean_key_multi . '%')
157
-                ->setParameter('kana', '%' . $clean_key_multi . '%')
158
-                ->setParameter('email', '%' . $clean_key_multi . '%');
156
+                ->setParameter('name', '%'.$clean_key_multi.'%')
157
+                ->setParameter('kana', '%'.$clean_key_multi.'%')
158
+                ->setParameter('email', '%'.$clean_key_multi.'%');
159 159
         }
160 160
 
161 161
         // Pref
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) {
206 206
             $qb
207 207
                 ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel')
208
-                ->setParameter('tel', '%' . $searchData['tel'] . '%');
208
+                ->setParameter('tel', '%'.$searchData['tel'].'%');
209 209
         }
210 210
 
211 211
         // buy_total
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                 ->leftJoin('c.Orders', 'o')
300 300
                 ->leftJoin('o.OrderDetails', 'od')
301 301
                 ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name')
302
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%');
302
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_code'].'%');
303 303
         }
304 304
 
305 305
         // Order By
Please login to merge, or discard this patch.
src/Eccube/Command/GeneratorCommand/EntityFromDbGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
             $cmf->setEntityManager($em);
165 165
             $metadatas = $cmf->getAllMetadata();
166 166
 
167
-            $filters = array_map(function ($value) {
167
+            $filters = array_map(function($value) {
168 168
                 return ucfirst(Inflector::camelize(str_replace('plg_', '', $value)));
169 169
             }, $tableList);
170 170
             $metadatas = MetadataFilter::filter($metadatas, $filters);
Please login to merge, or discard this patch.