Completed
Push — experimental/3.1 ( 10e424...a981bd )
by Kiyotaka
55:16
created
src/Eccube/Controller/Admin/Content/BlockController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 // ファイル生成・更新
172 172
                 $tplDir = $this->appConfig['block_realdir'];
173 173
 
174
-                $filePath = $tplDir . '/' . $Block->getFileName() . '.twig';
174
+                $filePath = $tplDir.'/'.$Block->getFileName().'.twig';
175 175
 
176 176
                 $fs = new Filesystem();
177 177
                 $blockData = $form->get('block_html')->getData();
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                 $fs->dumpFile($filePath, $blockData);
180 180
                 // 更新でファイル名を変更した場合、以前のファイルを削除
181 181
                 if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
182
-                    $oldFilePath = $tplDir . '/' . $previous_filename . '.twig';
182
+                    $oldFilePath = $tplDir.'/'.$previous_filename.'.twig';
183 183
                     if ($fs->exists($oldFilePath)) {
184 184
                         $fs->remove($oldFilePath);
185 185
                     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る
237 237
         if ($Block->isDeletable()) {
238 238
             $tplDir = $this->appConfig['block_realdir'];
239
-            $file = $tplDir . '/' . $Block->getFileName() . '.twig';
239
+            $file = $tplDir.'/'.$Block->getFileName().'.twig';
240 240
             $fs = new Filesystem();
241 241
             if ($fs->exists($file)) {
242 242
                 $fs->remove($file);
Please login to merge, or discard this patch.
src/Eccube/DI/AutoWiring/RepositoryDefinition.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
 
33 33
     /**
34 34
      * RepositoryDefinition constructor.
35
-     * @param $id
36
-     * @param $refClass
37
-     * @param $entityClass
35
+     * @param string $id
36
+     * @param \ReflectionClass $refClass
37
+     * @param string $entityClass
38 38
      */
39 39
     public function __construct($id, $refClass, $entityClass)
40 40
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@
 block discarded – undo
58 58
 
59 59
         // 同じパッケージのEntityがあれば返す
60 60
         if (count($partsOfFqcn) > 2) {
61
-            $parentNamespace = implode('\\', array_slice($partsOfFqcn, 0, count($partsOfFqcn)-2));
62
-            $entityName = preg_replace('/(.*)Repository/', '$1', $partsOfFqcn[count($partsOfFqcn) -1]);
63
-            $result = $parentNamespace . '\\Entity\\' . $entityName;
61
+            $parentNamespace = implode('\\', array_slice($partsOfFqcn, 0, count($partsOfFqcn) - 2));
62
+            $entityName = preg_replace('/(.*)Repository/', '$1', $partsOfFqcn[count($partsOfFqcn) - 1]);
63
+            $result = $parentNamespace.'\\Entity\\'.$entityName;
64 64
             if (class_exists($result)) {
65 65
                 return $result;
66 66
             }
Please login to merge, or discard this patch.
src/Eccube/Service/Composer/OutputParser.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 
128 128
     /**
129 129
      * @param $rowArray
130
-     * @param $key
130
+     * @param string $key
131 131
      * @return array
132 132
      */
133 133
     private static function parseArrayInfoOutput($rowArray, $key)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output));
40 40
         $installedLogs = array_filter(
41 41
             array_map(
42
-                function ($line) {
42
+                function($line) {
43 43
                     $matches = array();
44 44
                     preg_match('/^  - Installing (.*?) \((.*?)\) .*/', $line, $matches);
45 45
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public static function parseInfo($output)
63 63
     {
64 64
         $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output));
65
-        $infoLogs = array_filter(array_map(function ($line) {
65
+        $infoLogs = array_filter(array_map(function($line) {
66 66
             $matches = array();
67 67
             preg_match('/^(name|descrip.|keywords|versions|type|license|source|dist|names)\s*:\s*(.*)$/', $line, $matches);
68 68
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public static function parseConfig($output)
87 87
     {
88 88
         $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output));
89
-        $rowArray = array_filter($rowArray, function ($line) {
89
+        $rowArray = array_filter($rowArray, function($line) {
90 90
             return !preg_match('/^<warning>.*/', $line);
91 91
         });
92 92
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public static function parseList($output)
103 103
     {
104 104
         $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output));
105
-        $rawConfig = array_map(function ($line) {
105
+        $rawConfig = array_map(function($line) {
106 106
             $matches = array();
107 107
             preg_match('/^\[(.*?)\]\s?(.*)$/', $line, $matches);
108 108
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     public static function parseComposerVersion($output)
160 160
     {
161 161
         $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output));
162
-        $rowArray = array_filter($rowArray, function ($line) {
162
+        $rowArray = array_filter($rowArray, function($line) {
163 163
             return preg_match('/^Composer */', $line);
164 164
         });
165 165
         return array_shift($rowArray);
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Processor/AddPointProcessor.php 2 patches
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,6 @@
 block discarded – undo
27 27
 use Eccube\Annotation\Inject;
28 28
 use Eccube\Entity\BaseInfo;
29 29
 use Eccube\Entity\ItemHolderInterface;
30
-use Eccube\Entity\Master\OrderItemType;
31
-use Eccube\Entity\Master\TaxDisplayType;
32
-use Eccube\Entity\Master\TaxType;
33
-use Eccube\Entity\Order;
34
-use Eccube\Entity\OrderItem;
35
-use Eccube\Entity\Shipping;
36 30
 use Eccube\Service\PurchaseFlow\ItemHolderProcessor;
37 31
 use Eccube\Service\PurchaseFlow\ProcessResult;
38 32
 use Eccube\Service\PurchaseFlow\PurchaseContext;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      * @param integer $pointRate ポイント付与率(%)
92 92
      * @param integer $price 単価
93 93
      * @param integer $quantity 数量
94
-     * @return integer additional point
94
+     * @return double additional point
95 95
      */
96 96
     protected function priceToAddPoint($pointRate, $price, $quantity)
97 97
     {
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Processor/UsePointProcessor.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,9 @@
 block discarded – undo
11 11
 use Eccube\Entity\BaseInfo;
12 12
 use Eccube\Entity\Order;
13 13
 use Eccube\Entity\OrderItem;
14
-use Eccube\Entity\Shipping;
15 14
 use Eccube\Service\PurchaseFlow\ItemHolderProcessor;
16 15
 use Eccube\Service\PurchaseFlow\ProcessResult;
17 16
 use Eccube\Service\PurchaseFlow\PurchaseContext;
18
-use Eccube\Util\EntityUtil;
19 17
 
20 18
 /**
21 19
  * 使用ポイント値引明細追加.
Please login to merge, or discard this patch.
src/Eccube/Repository/DeliveryRepository.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     /**
44 44
      * @deprecated 呼び出し元で制御する
45
-     * @param $id
45
+     * @param integer $id
46 46
      * @return Delivery|null|object
47 47
      */
48 48
     public function findOrCreate($id)
Please login to merge, or discard this patch.
src/Eccube/Repository/NewsRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      */
115 115
     public function delete($News)
116 116
     {
117
-       $this->createQueryBuilder('n')
117
+        $this->createQueryBuilder('n')
118 118
             ->update()
119 119
             ->set('n.sort_no', 'n.sort_no - 1')
120 120
             ->where('n.sort_no > :sort_no')
Please login to merge, or discard this patch.
src/Eccube/Service/MailService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         ));
80 80
 
81 81
         $message = \Swift_Message::newInstance()
82
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
82
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
83 83
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
84 84
             ->setTo(array($Customer->getEmail()))
85 85
             ->setBcc($this->BaseInfo->getEmail01())
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         ));
121 121
 
122 122
         $message = \Swift_Message::newInstance()
123
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。')
123
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。')
124 124
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
125 125
             ->setTo(array($Customer->getEmail()))
126 126
             ->setBcc($this->BaseInfo->getEmail01())
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         ));
163 163
 
164 164
         $message = \Swift_Message::newInstance()
165
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了')
165
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了')
166 166
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
167 167
             ->setTo(array($email))
168 168
             ->setBcc($this->BaseInfo->getEmail01())
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         // 問い合わせ者にメール送信
207 207
         $message = \Swift_Message::newInstance()
208
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。')
208
+            ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。')
209 209
             ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName()))
210 210
             ->setTo(array($formData['email']))
211 211
             ->setBcc($this->BaseInfo->getEmail02())
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         ));
263 263
 
264 264
         $message = \Swift_Message::newInstance()
265
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getMailSubject())
265
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getMailSubject())
266 266
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
267 267
             ->setTo(array($Order->getEmail()))
268 268
             ->setBcc($this->BaseInfo->getEmail01())
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         ));
307 307
 
308 308
         $message = \Swift_Message::newInstance()
309
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
309
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
310 310
             ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName()))
311 311
             ->setTo(array($Customer->getEmail()))
312 312
             ->setBcc($this->BaseInfo->getEmail01())
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         ));
351 351
 
352 352
         $message = \Swift_Message::newInstance()
353
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['mail_subject'])
353
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['mail_subject'])
354 354
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
355 355
             ->setTo(array($Order->getEmail()))
356 356
             ->setBcc($this->BaseInfo->getEmail01())
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         ));
392 392
 
393 393
         $message = \Swift_Message::newInstance()
394
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認')
394
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認')
395 395
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
396 396
             ->setTo(array($Customer->getEmail()))
397 397
             ->setBcc($this->BaseInfo->getEmail01())
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
         ));
433 433
 
434 434
         $message = \Swift_Message::newInstance()
435
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')
435
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ')
436 436
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
437 437
             ->setTo(array($Customer->getEmail()))
438 438
             ->setBcc($this->BaseInfo->getEmail01())
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
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         // 配送業者のプルダウンを生成
68 68
         $builder->addEventListener(
69 69
             FormEvents::PRE_SET_DATA,
70
-            function (FormEvent $event) {
70
+            function(FormEvent $event) {
71 71
                 /* @var Shipping $Shipping */
72 72
                 $Shipping = $event->getData();
73 73
                 if (is_null($Shipping) || !$Shipping->getId()) {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         // お届け日のプルダウンを生成
110 110
         $builder->addEventListener(
111 111
             FormEvents::PRE_SET_DATA,
112
-            function (FormEvent $event) {
112
+            function(FormEvent $event) {
113 113
                 $Shipping = $event->getData();
114 114
                 if (is_null($Shipping) || !$Shipping->getId()) {
115 115
                     return;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
                 // 配送日数が設定されている
149 149
                 if ($deliveryDurationFlag) {
150
-                    $period = new \DatePeriod (
150
+                    $period = new \DatePeriod(
151 151
                         new \DateTime($minDate.' day'),
152 152
                         new \DateInterval('P1D'),
153 153
                         new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day')
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         // お届け時間のプルダウンを生成
176 176
         $builder->addEventListener(
177 177
             FormEvents::PRE_SET_DATA,
178
-            function (FormEvent $event) {
178
+            function(FormEvent $event) {
179 179
                 $Shipping = $event->getData();
180 180
                 if (is_null($Shipping) || !$Shipping->getId()) {
181 181
                     return;
Please login to merge, or discard this patch.