Completed
Pull Request — master (#1227)
by NOBU
21:56
created
src/Eccube/Application.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -25,11 +25,6 @@
 block discarded – undo
25 25
 
26 26
 use Eccube\Application\ApplicationTrait;
27 27
 use Eccube\Common\Constant;
28
-use Monolog\Formatter\LineFormatter;
29
-use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
30
-use Monolog\Handler\FingersCrossedHandler;
31
-use Monolog\Handler\RotatingFileHandler;
32
-use Monolog\Logger;
33 28
 use Symfony\Component\EventDispatcher\EventDispatcher;
34 29
 use Symfony\Component\Finder\Finder;
35 30
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
src/Eccube/Command/CacheClearCommand.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
 
25 25
 namespace Eccube\Command;
26 26
 
27
-use Symfony\Component\Console\Input\InputArgument;
28 27
 use Symfony\Component\Console\Input\InputInterface;
29 28
 use Symfony\Component\Console\Output\OutputInterface;
30 29
 use Symfony\Component\Console\Input\InputOption;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     protected function execute(InputInterface $input, OutputInterface $output) {
57 57
 
58
-        \Eccube\Util\Cache::clear($this->app,$input->getOption('all'));
58
+        \Eccube\Util\Cache::clear($this->app, $input->getOption('all'));
59 59
         $output->writeln(sprintf("%s <info>success</info>", 'cache:clear'));
60 60
 
61 61
     }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ProductClassController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,10 @@
 block discarded – undo
24 24
 
25 25
 namespace Eccube\Controller\Admin\Product;
26 26
 
27
-use Doctrine\ORM\EntityManagerInterface;
28 27
 use Symfony\Component\Form\FormError;
29 28
 use Symfony\Component\HttpFoundation\Request;
30 29
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
31 30
 use Symfony\Component\Validator\Constraints as Assert;
32
-
33 31
 use Eccube\Application;
34 32
 use Eccube\Common\Constant;
35 33
 use Eccube\Entity\ClassName;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     $class2Valied = $this->isValiedCategory($ClassName2);
95 95
 
96 96
                     // 規格が選択されていないか、選択された状態で分類が保有されていれば、画面表示
97
-                    if($class1Valied && $class2Valied){
97
+                    if ($class1Valied && $class2Valied) {
98 98
                         $hasClassCategoryFlg = true;
99 99
                     }
100 100
 
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
         // 個別消費税
583 583
         $BaseInfo = $app['eccube.repository.base_info']->get();
584 584
         if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED) {
585
-            if($productClassOrig->getTaxRate()) {
585
+            if ($productClassOrig->getTaxRate()) {
586 586
                 $productClassDest->setTaxRate($productClassOrig->getTaxRate());
587 587
                 if ($productClassDest->getTaxRule() && !$productClassDest->getTaxRule()->getDelFlg()) {
588 588
                     $productClassDest->getTaxRule()->setTaxRate($productClassOrig->getTaxRate());
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/MemberController.php 1 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/Setting/System/SecurityController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,7 @@
 block discarded – undo
28 28
 use Eccube\Common\Constant;
29 29
 use Eccube\Util\Str;
30 30
 use Eccube\Controller\AbstractController;
31
-
32 31
 use Symfony\Component\HttpFoundation\Request;
33
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
34 32
 use Symfony\Component\Yaml\Yaml;
35 33
 
36 34
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 // 現在のセキュリティ情報を更新
53 53
                 $adminRoot = $app['config']['admin_route'];
54 54
 
55
-                $configFile = $app['config']['root_dir'] . '/app/config/eccube/config.yml';
55
+                $configFile = $app['config']['root_dir'].'/app/config/eccube/config.yml';
56 56
                 $config = Yaml::parse(file_get_contents($configFile));
57 57
                 // trim処理
58 58
                 $allowHost = Str::convertLineFeed($data['admin_allow_host']);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
                 if ($adminRoot != $data['admin_route_dir']) {
84 84
                     // admin_routeが変更されればpath.ymlを更新
85
-                    $pathFile = $app['config']['root_dir'] . '/app/config/eccube/path.yml';
85
+                    $pathFile = $app['config']['root_dir'].'/app/config/eccube/path.yml';
86 86
                     $config = Yaml::parse(file_get_contents($pathFile));
87 87
                     $config['admin_route'] = $data['admin_route_dir'];
88 88
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     $this->getSecurity($app)->setToken(null);
95 95
 
96 96
                     // 管理者画面へ再ログイン
97
-                    return $app->redirect($request->getBaseUrl() . '/' . $config['admin_route']);
97
+                    return $app->redirect($request->getBaseUrl().'/'.$config['admin_route']);
98 98
                 }
99 99
 
100 100
                 $app->addSuccess('admin.sysmte.security.save.complete', 'admin');
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             if (count($allowHost) > 0) {
108 108
                 $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost)));
109 109
             }
110
-            $form->get('force_ssl')->setData((bool)$app['config']['force_ssl']);
110
+            $form->get('force_ssl')->setData((bool) $app['config']['force_ssl']);
111 111
         }
112 112
 
113 113
         return $app->render('Setting/System/security.twig', array(
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Store/TemplateController.php 2 patches
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.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
                     ->find($form['selected']->getData());
66 66
 
67 67
                 // path.ymlの再構築
68
-                $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml';
68
+                $file = $app['config']['root_dir'].'/app/config/eccube/path.yml';
69 69
                 $config = Yaml::parse($file);
70 70
 
71 71
                 $templateCode = $Template->getCode();
72 72
                 $config['template_code'] = $templateCode;
73
-                $config['template_realdir'] = $config['root_dir'] . '/app/template/' . $templateCode;
74
-                $config['template_html_realdir'] = $config['root_dir'] . '/html/template/' . $templateCode;
75
-                $config['front_urlpath'] = $config['root_urlpath'] . '/template/' . $templateCode;
76
-                $config['block_realdir'] =$config['template_realdir'] . '/Block';
73
+                $config['template_realdir'] = $config['root_dir'].'/app/template/'.$templateCode;
74
+                $config['template_html_realdir'] = $config['root_dir'].'/html/template/'.$templateCode;
75
+                $config['front_urlpath'] = $config['root_urlpath'].'/template/'.$templateCode;
76
+                $config['block_realdir'] = $config['template_realdir'].'/Block';
77 77
 
78 78
                 file_put_contents($file, Yaml::dump($config));
79 79
 
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
         // 該当テンプレートのディレクトリ
109 109
         $config = $app['config'];
110 110
         $templateCode = $Template->getCode();
111
-        $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
112
-        $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
111
+        $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
112
+        $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
113 113
 
114 114
         // 一時ディレクトリ
115 115
         $uniqId = sha1(Str::random(32));
116
-        $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId;
117
-        $appDir = $tmpDir . '/app';
118
-        $htmlDir = $tmpDir . '/html';
116
+        $tmpDir = $config['template_temp_realdir'].'/'.$uniqId;
117
+        $appDir = $tmpDir.'/app';
118
+        $htmlDir = $tmpDir.'/html';
119 119
 
120 120
         // ファイル名
121
-        $tarFile = $config['template_temp_realdir'] . '/' . $uniqId . '.tar';
122
-        $tarGzFile = $tarFile . '.gz';
123
-        $downloadFileName = $Template->getCode() . '.tar.gz';
121
+        $tarFile = $config['template_temp_realdir'].'/'.$uniqId.'.tar';
122
+        $tarGzFile = $tarFile.'.gz';
123
+        $downloadFileName = $Template->getCode().'.tar.gz';
124 124
 
125 125
         // 該当テンプレートを一時ディレクトリへコピーする.
126 126
         $fs = new Filesystem();
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 
141 141
         // ダウンロード完了後にファイルを削除する.
142 142
         // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony
143
-        $app->finish(function (Request $request, Response $response, \Silex\Application $app) use (
143
+        $app->finish(function(Request $request, Response $response, \Silex\Application $app) use (
144 144
             $tmpDir,
145 145
             $tarFile,
146 146
             $tarGzFile
147 147
         ) {
148
-            $app['monolog']->addDebug('remove temp file: ' . $tmpDir);
149
-            $app['monolog']->addDebug('remove temp file: ' . $tarFile);
150
-            $app['monolog']->addDebug('remove temp file: ' . $tarGzFile);
148
+            $app['monolog']->addDebug('remove temp file: '.$tmpDir);
149
+            $app['monolog']->addDebug('remove temp file: '.$tarFile);
150
+            $app['monolog']->addDebug('remove temp file: '.$tarGzFile);
151 151
             $fs = new Filesystem();
152 152
             $fs->remove($tmpDir);
153 153
             $fs->remove($tarFile);
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
         // テンプレートディレクトリの削除
189 189
         $config = $app['config'];
190 190
         $templateCode = $Template->getCode();
191
-        $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
192
-        $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
191
+        $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
192
+        $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
193 193
 
194 194
         $fs = new Filesystem();
195 195
         $fs->remove($targetRealDir);
@@ -232,18 +232,18 @@  discard block
 block discarded – undo
232 232
                 // 該当テンプレートのディレクトリ
233 233
                 $config = $app['config'];
234 234
                 $templateCode = $Template->getCode();
235
-                $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
236
-                $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
235
+                $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
236
+                $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
237 237
 
238 238
                 // 一時ディレクトリ
239 239
                 $uniqId = sha1(Str::random(32));
240
-                $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId;
241
-                $appDir = $tmpDir . '/app';
242
-                $htmlDir = $tmpDir . '/html';
240
+                $tmpDir = $config['template_temp_realdir'].'/'.$uniqId;
241
+                $appDir = $tmpDir.'/app';
242
+                $htmlDir = $tmpDir.'/html';
243 243
 
244 244
                 $formFile = $form['file']->getData();
245 245
                 // ファイル名
246
-                $archive = $templateCode . '.' . $formFile->getClientOriginalExtension();
246
+                $archive = $templateCode.'.'.$formFile->getClientOriginalExtension();
247 247
 
248 248
                 // ファイルを一時ディレクトリへ移動.
249 249
                 $formFile->move($tmpDir, $archive);
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
                 try {
253 253
                     if ($formFile->getClientOriginalExtension() == 'zip') {
254 254
                         $zip = new \ZipArchive();
255
-                        $zip->open($tmpDir . '/' . $archive);
255
+                        $zip->open($tmpDir.'/'.$archive);
256 256
                         $zip->extractTo($tmpDir);
257 257
                         $zip->close();
258 258
                     } else {
259
-                        $phar = new \PharData($tmpDir . '/' . $archive);
259
+                        $phar = new \PharData($tmpDir.'/'.$archive);
260 260
                         $phar->extractTo($tmpDir, null, true);
261 261
                     }
262 262
                 } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/KanaType.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -25,9 +25,7 @@
 block discarded – undo
25 25
 
26 26
 use Symfony\Component\Form\AbstractType;
27 27
 use Symfony\Component\Form\FormBuilderInterface;
28
-use Symfony\Component\Form\FormEvents;
29 28
 use Symfony\Component\Validator\Constraints as Assert;
30
-use Symfony\Component\OptionsResolver\Options;
31 29
 use Symfony\Component\OptionsResolver\OptionsResolver;
32 30
 
33 31
 /**
Please login to merge, or discard this patch.
src/Eccube/Service/CsvExportService.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@
 block discarded – undo
26 26
 
27 27
 use Eccube\Common\Constant;
28 28
 use Eccube\Util\EntityUtil;
29
-use Symfony\Component\Form\FormFactory;
30 29
 use Symfony\Component\HttpFoundation\Request;
31 30
 
32 31
 class CsvExportService
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
     {
308 308
         $config = $this->config;
309 309
 
310
-        return function ($value) use ($config) {
310
+        return function($value) use ($config) {
311 311
             return mb_convert_encoding(
312 312
                 (string) $value, $config['csv_export_encoding'], 'UTF-8'
313 313
             );
Please login to merge, or discard this patch.
src/Eccube/Service/CsvImportService.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace Eccube\Service;
25 25
 
26
-use Eccube\Application;
27
-
28 26
 
29 27
 /**
30 28
  * Copyright (C) 2012-2014 David de Boer <[email protected]>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 
118 118
         $this->file = $file;
119 119
         $this->file->setFlags(
120
-            \SplFileObject::READ_CSV |
121
-            \SplFileObject::SKIP_EMPTY |
122
-            \SplFileObject::READ_AHEAD |
120
+            \SplFileObject::READ_CSV|
121
+            \SplFileObject::SKIP_EMPTY|
122
+            \SplFileObject::READ_AHEAD|
123 123
             \SplFileObject::DROP_NEW_LINE
124 124
         );
125 125
         $this->file->setCsvControl(
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             if ($count > 1) {
359 359
                 $incrementedHeaders[] = $header;
360 360
                 for ($i = 1; $i < $count; $i++) {
361
-                    $incrementedHeaders[] = $header . $i;
361
+                    $incrementedHeaders[] = $header.$i;
362 362
                 }
363 363
             } else {
364 364
                 $incrementedHeaders[] = $header;
Please login to merge, or discard this patch.