Completed
Push — master ( 3826d6...5ee632 )
by Ryo
35:14
created
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/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_get_contents($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['public_path_realdir'] . '/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['public_path_realdir'].'/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/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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 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
             );
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             if ($Conditions instanceof ArrayCollection) {
432 432
                 $Conditions = new ArrayCollection(
433 433
                     array_map(
434
-                        function ($Entity) use ($em) {
434
+                        function($Entity) use ($em) {
435 435
                             return $em->getRepository(get_class($Entity))->find($Entity->getId());
436 436
                         }, $Conditions->toArray()
437 437
                     )
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.
html/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 require __DIR__.'/../autoload.php';
26 26
 
27 27
 ini_set('display_errors', 'Off');
28
-error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
28
+error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT);
29 29
 
30 30
 $app = new Eccube\Application();
31 31
 
Please login to merge, or discard this patch.
html/index_dev.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
 // load config dev
60 60
 $conf = $app['config'];
61
-$app['config'] = $app->share(function () use ($conf) {
61
+$app['config'] = $app->share(function() use ($conf) {
62 62
     $confarray = array();
63 63
     $config_dev_file = __DIR__.'/../app/config/eccube/config_dev.yml';
64 64
     if (file_exists($config_dev_file)) {
Please login to merge, or discard this patch.
html/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
     apc_clear_cache();
27 27
 }
28 28
 
29
-require __DIR__ . '/../autoload.php';
29
+require __DIR__.'/../autoload.php';
30 30
 
31 31
 $app = new Eccube\InstallApplication();
32 32
 $app['debug'] = true;
33
-$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
33
+$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
34 34
     if (!$request->getSession()->isStarted()) {
35 35
         $request->getSession()->start();
36 36
     }
Please login to merge, or discard this patch.
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/AdminController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         // install.phpのチェック.
57 57
         if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) {
58
-            $file = $app['config']['root_dir'] . '/html/install.php';
58
+            $file = $app['config']['root_dir'].'/html/install.php';
59 59
             if (file_exists($file)) {
60 60
                 $app->addWarning('admin.install.warning', 'admin');
61 61
             }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                     t1.status
185 185
                 ORDER BY
186 186
                     t1.status';
187
-        $rsm = new ResultSetMapping();;
187
+        $rsm = new ResultSetMapping(); ;
188 188
         $rsm->addScalarResult('status', 'status');
189 189
         $rsm->addScalarResult('count', 'count');
190 190
         $query = $em->createNativeQuery($sql, $rsm);
Please login to merge, or discard this patch.