Failed Conditions
Pull Request — master (#1429)
by Kentaro
43:16
created
src/Eccube/Controller/AbstractController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     protected function getBoundForm(Application $app, $type)
39 39
     {
40 40
         $form = $app['form.factory']
41
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
41
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
42 42
             ->getForm();
43 43
         $form->handleRequest($app['request']);
44 44
 
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/BlockController.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,19 +88,19 @@  discard block
 block discarded – undo
88 88
                 // ファイル生成・更新
89 89
                 $tplDir = $app['config']['block_realdir'];
90 90
 
91
-                $filePath = $tplDir . '/' . $Block->getFileName() . '.twig';
91
+                $filePath = $tplDir.'/'.$Block->getFileName().'.twig';
92 92
 
93 93
                 $fs = new Filesystem();
94 94
                 $fs->dumpFile($filePath, $form->get('block_html')->getData());
95 95
                 // 更新でファイル名を変更した場合、以前のファイルを削除
96 96
                 if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
97
-                    $oldFilePath = $tplDir . $previous_filename;
97
+                    $oldFilePath = $tplDir.$previous_filename;
98 98
                     if ($fs->exists($oldFilePath)) {
99 99
                         $fs->remove($oldFilePath);
100 100
                     }
101 101
                 }
102 102
 
103
-                \Eccube\Util\Cache::clear($app,false);
103
+                \Eccube\Util\Cache::clear($app, false);
104 104
 
105 105
                 $app->addSuccess('admin.register.complete', 'admin');
106 106
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る
138 138
         if ($Block->getDeletableFlg() > 0) {
139 139
             $tplDir = $app['config']['block_realdir'];
140
-            $file = $tplDir . '/' . $Block->getFileName() . '.twig';
140
+            $file = $tplDir.'/'.$Block->getFileName().'.twig';
141 141
             $fs = new Filesystem();
142 142
             if ($fs->exists($file)) {
143 143
                 $fs->remove($file);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $app['orm.em']->flush();
147 147
 
148 148
             $app->addSuccess('admin.delete.complete', 'admin');
149
-            \Eccube\Util\Cache::clear($app,false);
149
+            \Eccube\Util\Cache::clear($app, false);
150 150
         }
151 151
 
152 152
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use Eccube\Entity\Master\DeviceType;
29 29
 use Eccube\Util\Str;
30 30
 use Symfony\Component\Filesystem\Filesystem;
31
-use Symfony\Component\Finder\Finder;
32 31
 use Symfony\Component\Form\FormError;
33 32
 use Symfony\Component\HttpFoundation\Request;
34 33
 use Symfony\Component\HttpFoundation\Response;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/LayoutController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
                 $max = count($Blocks);
90 90
                 for ($i = 0; $i < $max; $i++) {
91 91
                     // block_id が取得できない場合は INSERT しない
92
-                    if (!isset($data['id_' . $i])) {
92
+                    if (!isset($data['id_'.$i])) {
93 93
                         continue;
94 94
                     }
95 95
                     // 未使用は INSERT しない
96
-                    if ($data['target_id_' . $i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) {
96
+                    if ($data['target_id_'.$i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) {
97 97
                         continue;
98 98
                     }
99 99
                     // 他のページに anywhere が存在する場合は INSERT しない
100
-                    $anywhere = (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) ? 1 : 0;
101
-                    if (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) {
100
+                    $anywhere = (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) ? 1 : 0;
101
+                    if (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) {
102 102
                         $Other = $app['orm.em']->getRepository('Eccube\Entity\BlockPosition')
103 103
                             ->findBy(array(
104 104
                                 'anywhere' => 1,
105
-                                'block_id' => $data['id_' . $i],
105
+                                'block_id' => $data['id_'.$i],
106 106
                             ));
107 107
                         if (count($Other) > 0) {
108 108
                             continue;
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
                     $BlockPosition = new \Eccube\Entity\BlockPosition();
113 113
                     $Block = $app['orm.em']->getRepository('Eccube\Entity\Block')
114 114
                         ->findOneBy(array(
115
-                            'id' => $data['id_' . $i],
115
+                            'id' => $data['id_'.$i],
116 116
                             'DeviceType' => $DeviceType,
117 117
                         ));
118 118
                     $BlockPosition
119 119
                         ->setPageId($id)
120
-                        ->setBlockId($data['id_' . $i])
121
-                        ->setBlockRow($data['top_' . $i])
122
-                        ->setTargetId($data['target_id_' . $i])
120
+                        ->setBlockId($data['id_'.$i])
121
+                        ->setBlockRow($data['top_'.$i])
122
+                        ->setTargetId($data['target_id_'.$i])
123 123
                         ->setBlock($Block)
124 124
                         ->setPageLayout($TargetPageLayout)
125 125
                         ->setAnywhere($anywhere);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/PageController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
                 // ファイル生成・更新
91 91
                 $templatePath = $app['eccube.repository.page_layout']->getWriteTemplatePath($editable);
92
-                $filePath = $templatePath . '/' . $PageLayout->getFileName() . '.twig';
92
+                $filePath = $templatePath.'/'.$PageLayout->getFileName().'.twig';
93 93
 
94 94
                 $fs = new Filesystem();
95 95
                 $fs->dumpFile($filePath, $form->get('tpl_data')->getData());
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 $app->addSuccess('admin.register.complete', 'admin');
98 98
 
99 99
                 // twig キャッシュの削除.
100
-                $finder = Finder::create()->in($app['config']['root_dir'] . '/app/cache/twig');
100
+                $finder = Finder::create()->in($app['config']['root_dir'].'/app/cache/twig');
101 101
                 $fs->remove($finder);
102 102
 
103 103
                 return $app->redirect($app->url('admin_content_page_edit', array('id' => $PageLayout->getId())));
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         if ($PageLayout->getEditFlg() == PageLayout::EDIT_FLG_USER) {
137 137
             $templatePath = $app['eccube.repository.page_layout']
138 138
                 ->getWriteTemplatePath($DeviceType, true);
139
-            $file = $templatePath . '/' . $PageLayout->getFileName() . '.twig';
139
+            $file = $templatePath.'/'.$PageLayout->getFileName().'.twig';
140 140
             $fs = new Filesystem();
141 141
             if ($fs->exists($file)) {
142 142
                 $fs->remove($file);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Customer/CustomerEditController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
                     'id' => $Customer->getId(),
110 110
                 )));
111 111
             } else { 
112
-                $app->addError('admin.customer.save.failed','admin');
112
+                $app->addError('admin.customer.save.failed', 'admin');
113 113
             }
114 114
         }
115 115
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace Eccube\Controller\Admin\Setting\System;
25 25
 
26
-use Doctrine\Common\Util\Debug;
27 26
 use Eccube\Application;
28 27
 use Eccube\Controller\AbstractController;
29 28
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/CategoryController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $em->getConfiguration()->setSQLLogger(null);
165 165
 
166 166
         $response = new StreamedResponse();
167
-        $response->setCallback(function () use ($app, $request) {
167
+        $response->setCallback(function() use ($app, $request) {
168 168
 
169 169
             // CSV種別を元に初期化.
170 170
             $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CATEGORY);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
             // データ行の出力.
180 180
             $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
181
-            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
181
+            $app['eccube.service.csv.export']->exportData(function($entity, $csvService) {
182 182
 
183 183
                 $Csvs = $csvService->getCsvs();
184 184
 
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
         });
199 199
 
200 200
         $now = new \DateTime();
201
-        $filename = 'category_' . $now->format('YmdHis') . '.csv';
201
+        $filename = 'category_'.$now->format('YmdHis').'.csv';
202 202
         $response->headers->set('Content-Type', 'application/octet-stream');
203
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
203
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
204 204
         $response->send();
205 205
 
206 206
         return $response;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ClassCategoryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
         $num = $app['eccube.repository.product_class']->createQueryBuilder('pc')
96 96
             ->select('count(pc.id)')
97 97
             ->where('pc.ClassCategory1 = :id OR pc.ClassCategory2 = :id')
98
-            ->setParameter('id',$id)
98
+            ->setParameter('id', $id)
99 99
             ->getQuery()
100 100
             ->getSingleScalarResult();
101 101
         if ($num > 0) {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
                 // ファイルアップロード
71 71
                 $file = $form['payment_image']->getData();
72 72
                 $fs = new Filesystem();
73
-                if ($file && $fs->exists($app['config']['image_temp_realdir'] . '/' . $file)) {
73
+                if ($file && $fs->exists($app['config']['image_temp_realdir'].'/'.$file)) {
74 74
                     $fs->rename(
75
-                        $app['config']['image_temp_realdir'] . '/' . $file,
76
-                        $app['config']['image_save_realdir'] . '/' . $file
75
+                        $app['config']['image_temp_realdir'].'/'.$file,
76
+                        $app['config']['image_save_realdir'].'/'.$file
77 77
                     );
78 78
                 }
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         if (isset($images['payment_image_file'])) {
101 101
             $image = $images['payment_image_file'];
102 102
             $extension = $image->guessExtension();
103
-            $filename = date('mdHis') . uniqid('_') . '.' . $extension;
103
+            $filename = date('mdHis').uniqid('_').'.'.$extension;
104 104
             $image->move($app['config']['image_temp_realdir'], $filename);
105 105
         }
106 106
 
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
         foreach ($Payments as $Payment) {
128 128
             if ($Payment->getId() != $id) {
129 129
                 $Payment->setRank($rank);
130
-                $rank ++;
130
+                $rank++;
131 131
             }
132 132
         }
133 133
         $app['orm.em']->flush();
134 134
 
135
-        $app->addSuccess('admin.delete.complete', 'admin') ;
135
+        $app->addSuccess('admin.delete.complete', 'admin');
136 136
 
137 137
         return $app->redirect($app->url('admin_setting_shop_payment'));
138 138
     }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/LogController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $log = array();
63 63
         $message = array();
64 64
 
65
-        foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) as $line) {
65
+        foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) as $line) {
66 66
             // 上限に達した場合、処理を抜ける
67 67
             if (count($log) >= $formData['line_max']) {
68 68
                 break;
Please login to merge, or discard this patch.