Completed
Push — master ( 69c079...087209 )
by Ryo
81:53
created
src/Eccube/Controller/Mypage/DeliveryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する
84 84
         if (!in_array($parentPage, $allowdParents)) {
85 85
             // @deprecated 使用されていないコード
86
-            $parentPage  = $app->url('mypage_delivery');
86
+            $parentPage = $app->url('mypage_delivery');
87 87
         }
88 88
 
89 89
         $builder = $app['form.factory']
Please login to merge, or discard this patch.
src/Eccube/Controller/UserDataController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $paths[] = $app['config']['user_data_realdir'];
56 56
         $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
57 57
 
58
-        $file = $PageLayout->getFileName() . '.twig';
58
+        $file = $PageLayout->getFileName().'.twig';
59 59
 
60 60
         $event = new EventArgs(
61 61
             array(
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
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED);
46 46
 
47 47
         $form = $app['form.factory']
48
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
48
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
49 49
             ->getForm();
50 50
         $form->handleRequest($app['request']);
51 51
 
Please login to merge, or discard this patch.
src/Eccube/Controller/ForgotController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 // リセットキーの発行・有効期限の設定
65 65
                 $Customer
66 66
                     ->setResetKey($app['eccube.repository.customer']->getUniqueResetKey($app))
67
-                    ->setResetExpire(new \DateTime('+' . $app['config']['customer_reset_expire'] .' min'));
67
+                    ->setResetExpire(new \DateTime('+'.$app['config']['customer_reset_expire'].' min'));
68 68
 
69 69
                 // リセットキーを更新
70 70
                 $app['orm.em']->persist($Customer);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
                 // ログ出力
89 89
                 $app['monolog']->addInfo(
90
-                    'send reset password mail to:'  . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
90
+                    'send reset password mail to:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
91 91
                 );
92 92
             } else {
93 93
                 log_warning('Un active customer try send reset password email: ', array('Enter email' => $form->get('login_email')->getData()));
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             // ログ出力
171 171
             $app['monolog']->addInfo(
172
-                'reset password complete:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
172
+                'reset password complete:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
173 173
             );
174 174
         } else {
175 175
             throw new HttpException\AccessDeniedHttpException('不正なアクセスです。');
Please login to merge, or discard this patch.
src/Eccube/Repository/OrderRepository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
         if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) {
101 101
             $qb
102 102
                 ->andWhere('CONCAT(o.name01, o.name02) LIKE :name')
103
-                ->setParameter('name', '%' . $searchData['name'] . '%');
103
+                ->setParameter('name', '%'.$searchData['name'].'%');
104 104
         }
105 105
 
106 106
         // kana
107 107
         if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) {
108 108
             $qb
109 109
                 ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana')
110
-                ->setParameter('kana', '%' . $searchData['kana'] . '%');
110
+                ->setParameter('kana', '%'.$searchData['kana'].'%');
111 111
         }
112 112
 
113 113
         // email
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             $qb
245 245
                 ->leftJoin('o.OrderDetails', 'od')
246 246
                 ->andWhere('od.product_name LIKE :buy_product_name')
247
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%');
247
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
248 248
         }
249 249
 
250 250
         // Order By
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
                 ->setParameter('order_id_start', $searchData['order_id_start']);
271 271
         }
272 272
         // multi
273
-        if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
273
+        if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
274 274
             $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null;
275 275
             $qb
276
-                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' .
276
+                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '.
277 277
                            'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti')
278 278
                 ->setParameter('multi', $multi)
279
-                ->setParameter('likemulti', '%' . $searchData['multi'] . '%');
279
+                ->setParameter('likemulti', '%'.$searchData['multi'].'%');
280 280
         }
281 281
 
282 282
         // order_id_end
@@ -313,28 +313,28 @@  discard block
 block discarded – undo
313 313
         if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) {
314 314
             $qb
315 315
                 ->andWhere('CONCAT(o.name01, o.name02) LIKE :name')
316
-                ->setParameter('name', '%' . $searchData['name'] . '%');
316
+                ->setParameter('name', '%'.$searchData['name'].'%');
317 317
         }
318 318
 
319 319
         // kana
320 320
         if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) {
321 321
             $qb
322 322
                 ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana')
323
-                ->setParameter('kana', '%' . $searchData['kana'] . '%');
323
+                ->setParameter('kana', '%'.$searchData['kana'].'%');
324 324
         }
325 325
 
326 326
         // email
327 327
         if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) {
328 328
             $qb
329 329
                 ->andWhere('o.email like :email')
330
-                ->setParameter('email', '%' . $searchData['email'] . '%');
330
+                ->setParameter('email', '%'.$searchData['email'].'%');
331 331
         }
332 332
 
333 333
         // tel
334 334
         if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) {
335 335
             $qb
336 336
                 ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel')
337
-                ->setParameter('tel', '%' . $searchData['tel'] . '%');
337
+                ->setParameter('tel', '%'.$searchData['tel'].'%');
338 338
         }
339 339
 
340 340
         // sex
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
             $qb
447 447
                 ->leftJoin('o.OrderDetails', 'od')
448 448
                 ->andWhere('od.product_name LIKE :buy_product_name')
449
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%');
449
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
450 450
         }
451 451
 
452 452
         // Order By
Please login to merge, or discard this patch.
src/Eccube/Repository/ProductRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 $key = sprintf('keyword%s', $index);
114 114
                 $qb
115 115
                     ->andWhere(sprintf('NORMALIZE(p.name) LIKE NORMALIZE(:%s) OR NORMALIZE(p.search_word) LIKE NORMALIZE(:%s)', $key, $key))
116
-                    ->setParameter($key, '%' . $keyword . '%');
116
+                    ->setParameter($key, '%'.$keyword.'%');
117 117
             }
118 118
         }
119 119
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $qb
177 177
                 ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid')
178 178
                 ->setParameter('id', $id)
179
-                ->setParameter('likeid', '%' . $searchData['id'] . '%');
179
+                ->setParameter('likeid', '%'.$searchData['id'].'%');
180 180
         }
181 181
 
182 182
         // code
Please login to merge, or discard this patch.
src/Eccube/Controller/Install/InstallController.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function __construct()
58 58
     {
59
-        $this->config_path = __DIR__ . '/../../../../app/config/eccube';
60
-        $this->dist_path = __DIR__ . '/../../Resource/config';
61
-        $this->cache_path = __DIR__ . '/../../../../app/cache';
59
+        $this->config_path = __DIR__.'/../../../../app/config/eccube';
60
+        $this->dist_path = __DIR__.'/../../Resource/config';
61
+        $this->cache_path = __DIR__.'/../../../../app/cache';
62 62
     }
63 63
 
64 64
     private function isValid(Request $request, Form $form)
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         return $app['twig']->render('step1.twig', array(
110 110
                 'form' => $form->createView(),
111
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
111
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
112 112
         ));
113 113
     }
114 114
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         return $app['twig']->render('step2.twig', array(
133 133
                 'protectedDirs' => $protectedDirs,
134
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
134
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
135 135
         ));
136 136
     }
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         if (empty($sessionData['shop_name'])) {
147 147
 
148
-            $config_file = $this->config_path . '/config.yml';
148
+            $config_file = $this->config_path.'/config.yml';
149 149
             $fs = new Filesystem();
150 150
 
151 151
             if ($fs->exists($config_file)) {
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
                 }
160 160
 
161 161
                 // セキュリティの設定
162
-                $config_file = $this->config_path . '/path.yml';
162
+                $config_file = $this->config_path.'/path.yml';
163 163
                 $config = Yaml::parse(file_get_contents($config_file));
164 164
                 $sessionData['admin_dir'] = $config['admin_route'];
165 165
 
166
-                $config_file = $this->config_path . '/config.yml';
166
+                $config_file = $this->config_path.'/config.yml';
167 167
                 $config = Yaml::parse(file_get_contents($config_file));
168 168
 
169 169
                 $allowHost = $config['admin_allow_host'];
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
                 $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
174 174
 
175 175
                 // ロードバランサー、プロキシサーバ設定
176
-                $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only'];
176
+                $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only'];
177 177
                 $trustedProxies = $config['admin_allow_host'];
178 178
                 if (count($trustedProxies) > 0) {
179 179
                     $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", $trustedProxies));
180 180
                 }
181 181
 
182 182
                 // メール設定
183
-                $config_file = $this->config_path . '/mail.yml';
183
+                $config_file = $this->config_path.'/mail.yml';
184 184
                 $config = Yaml::parse(file_get_contents($config_file));
185 185
                 $mail = $config['mail'];
186 186
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
         return $app['twig']->render('step3.twig', array(
205 205
                 'form' => $form->createView(),
206
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
206
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
207 207
         ));
208 208
     }
209 209
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         if (empty($sessionData['database'])) {
220 220
 
221
-            $config_file = $this->config_path . '/database.yml';
221
+            $config_file = $this->config_path.'/database.yml';
222 222
             $fs = new Filesystem();
223 223
 
224 224
             if ($fs->exists($config_file)) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         return $app['twig']->render('step4.twig', array(
248 248
                 'form' => $form->createView(),
249
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
249
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
250 250
         ));
251 251
     }
252 252
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                 $host = $request->getSchemeAndHttpHost();
293 293
                 $basePath = $request->getBasePath();
294 294
                 $params = array(
295
-                    'http_url' => $host . $basePath,
295
+                    'http_url' => $host.$basePath,
296 296
                     'shop_name' => $sessionData['shop_name'],
297 297
                 );
298 298
 
@@ -307,16 +307,16 @@  discard block
 block discarded – undo
307 307
 
308 308
         return $app['twig']->render('step5.twig', array(
309 309
                 'form' => $form->createView(),
310
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
310
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
311 311
         ));
312 312
     }
313 313
 
314 314
     //    インストール完了
315 315
     public function complete(InstallApplication $app, Request $request)
316 316
     {
317
-        $config_yml = $this->config_path . '/config.yml';
317
+        $config_yml = $this->config_path.'/config.yml';
318 318
         $config = Yaml::parse(file_get_contents($config_yml));
319
-        $config_path = $this->config_path . '/path.yml';
319
+        $config_path = $this->config_path.'/path.yml';
320 320
         $path_yml = Yaml::parse(file_get_contents($config_path));
321 321
 
322 322
         $config = array_replace_recursive($path_yml, $config);
@@ -331,11 +331,11 @@  discard block
 block discarded – undo
331 331
         $host = $request->getSchemeAndHttpHost();
332 332
         $basePath = $request->getBasePath();
333 333
 
334
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
334
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
335 335
 
336 336
         return $app['twig']->render('complete.twig', array(
337 337
                 'admin_url' => $adminUrl,
338
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
338
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
339 339
         ));
340 340
     }
341 341
 
@@ -351,12 +351,12 @@  discard block
 block discarded – undo
351 351
     {
352 352
         foreach ($this->required_modules as $module) {
353 353
             if (!extension_loaded($module)) {
354
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
354
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
355 355
             }
356 356
         }
357 357
 
358 358
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
359
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
359
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
360 360
         }
361 361
 
362 362
         foreach ($this->recommended_module as $module) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             if (!function_exists('apache_get_modules')) {
385 385
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
386 386
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
387
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
387
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
388 388
             }
389 389
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
390 390
             // iis
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
     private function setPDO()
397 397
     {
398
-        $config_file = $this->config_path . '/database.yml';
398
+        $config_file = $this->config_path.'/database.yml';
399 399
         $config = Yaml::parse(file_get_contents($config_file));
400 400
 
401 401
         try {
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
      */
430 430
     private function getEntityManager()
431 431
     {
432
-        $config_file = $this->config_path . '/database.yml';
432
+        $config_file = $this->config_path.'/database.yml';
433 433
         $database = Yaml::parse(file_get_contents($config_file));
434 434
 
435 435
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -437,15 +437,15 @@  discard block
 block discarded – undo
437 437
         ));
438 438
 
439 439
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
440
-            'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
440
+            'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
441 441
             'orm.em.options' => array(
442 442
                 'mappings' => array(
443 443
                     array(
444 444
                         'type' => 'yml',
445 445
                         'namespace' => 'Eccube\Entity',
446 446
                         'path' => array(
447
-                            __DIR__ . '/../../Resource/doctrine',
448
-                            __DIR__ . '/../../Resource/doctrine/master',
447
+                            __DIR__.'/../../Resource/doctrine',
448
+                            __DIR__.'/../../Resource/doctrine/master',
449 449
                         ),
450 450
                     ),
451 451
                 ),
@@ -472,11 +472,11 @@  discard block
 block discarded – undo
472 472
     {
473 473
         $this->resetNatTimer();
474 474
 
475
-        $config_file = $this->config_path . '/database.yml';
475
+        $config_file = $this->config_path.'/database.yml';
476 476
         $database = Yaml::parse(file_get_contents($config_file));
477 477
         $config['database'] = $database['database'];
478 478
 
479
-        $config_file = $this->config_path . '/config.yml';
479
+        $config_file = $this->config_path.'/config.yml';
480 480
         $baseConfig = Yaml::parse(file_get_contents($config_file));
481 481
         $config['config'] = $baseConfig;
482 482
 
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
     {
533 533
         $this->resetNatTimer();
534 534
 
535
-        $config_file = $this->config_path . '/database.yml';
535
+        $config_file = $this->config_path.'/database.yml';
536 536
         $database = Yaml::parse(file_get_contents($config_file));
537 537
         $config['database'] = $database['database'];
538 538
 
539
-        $config_file = $this->config_path . '/config.yml';
539
+        $config_file = $this->config_path.'/config.yml';
540 540
         $baseConfig = Yaml::parse(file_get_contents($config_file));
541 541
         $config['config'] = $baseConfig;
542 542
 
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
         $config = new Configuration($app['db']);
600 600
         $config->setMigrationsNamespace('DoctrineMigrations');
601 601
 
602
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
602
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
603 603
         $config->setMigrationsDirectory($migrationDir);
604 604
         $config->registerMigrationsFromDirectory($migrationDir);
605 605
 
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
     private function getProtectedDirs()
632 632
     {
633 633
         $protectedDirs = array();
634
-        $base = __DIR__ . '/../../../..';
634
+        $base = __DIR__.'/../../../..';
635 635
         $dirs = array(
636 636
             '/html',
637 637
             '/app',
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
         );
645 645
 
646 646
         foreach ($dirs as $dir) {
647
-            if (!is_writable($base . $dir)) {
647
+            if (!is_writable($base.$dir)) {
648 648
                 $protectedDirs[] = $dir;
649 649
             }
650 650
         }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     private function createConfigYamlFile($data, $auth = true)
656 656
     {
657 657
         $fs = new Filesystem();
658
-        $config_file = $this->config_path . '/config.yml';
658
+        $config_file = $this->config_path.'/config.yml';
659 659
 
660 660
         if ($fs->exists($config_file)) {
661 661
             $config = Yaml::parse(file_get_contents($config_file));
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 
697 697
         $fs = new Filesystem();
698 698
         $content = str_replace(
699
-            $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist')
699
+            $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist')
700 700
         );
701 701
         $fs->dumpFile($config_file, $content);
702 702
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 
712 712
     private function addInstallStatus()
713 713
     {
714
-        $config_file = $this->config_path . '/config.yml';
714
+        $config_file = $this->config_path.'/config.yml';
715 715
         $config = Yaml::parse(file_get_contents($config_file));
716 716
         $config['eccube_install'] = 1;
717 717
         $yml = Yaml::dump($config);
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
     private function createDatabaseYamlFile($data)
724 724
     {
725 725
         $fs = new Filesystem();
726
-        $config_file = $this->config_path . '/database.yml';
726
+        $config_file = $this->config_path.'/database.yml';
727 727
         if ($fs->exists($config_file)) {
728 728
             $fs->remove($config_file);
729 729
         }
@@ -756,14 +756,14 @@  discard block
 block discarded – undo
756 756
 
757 757
             $fs = new Filesystem();
758 758
             $content = str_replace(
759
-                $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist')
759
+                $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist')
760 760
             );
761 761
         } else {
762 762
             $content = Yaml::dump(
763 763
                     array(
764 764
                         'database' => array(
765 765
                             'driver' => 'pdo_sqlite',
766
-                            'path' => realpath($this->config_path . '/eccube.db')
766
+                            'path' => realpath($this->config_path.'/eccube.db')
767 767
                         )
768 768
                     )
769 769
             );
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     private function createMailYamlFile($data)
777 777
     {
778 778
         $fs = new Filesystem();
779
-        $config_file = $this->config_path . '/mail.yml';
779
+        $config_file = $this->config_path.'/mail.yml';
780 780
         if ($fs->exists($config_file)) {
781 781
             $fs->remove($config_file);
782 782
         }
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 
792 792
         $fs = new Filesystem();
793 793
         $content = str_replace(
794
-            $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist')
794
+            $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist')
795 795
         );
796 796
         $fs->dumpFile($config_file, $content);
797 797
 
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
     private function createPathYamlFile($data, Request $request)
802 802
     {
803 803
         $fs = new Filesystem();
804
-        $config_file = $this->config_path . '/path.yml';
804
+        $config_file = $this->config_path.'/path.yml';
805 805
         if ($fs->exists($config_file)) {
806 806
             $fs->remove($config_file);
807 807
         }
@@ -809,16 +809,16 @@  discard block
 block discarded – undo
809 809
         $ADMIN_ROUTE = $data['admin_dir'];
810 810
         $TEMPLATE_CODE = 'default';
811 811
         $USER_DATA_ROUTE = 'user_data';
812
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
812
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
813 813
         $ROOT_URLPATH = $request->getBasePath();
814
-        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH;
814
+        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH;
815 815
 
816 816
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}');
817 817
         $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH);
818 818
 
819 819
         $fs = new Filesystem();
820 820
         $content = str_replace(
821
-            $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist')
821
+            $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist')
822 822
         );
823 823
         $fs->dumpFile($config_file, $content);
824 824
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 
828 828
     private function sendAppData($params)
829 829
     {
830
-        $config_file = $this->config_path . '/database.yml';
830
+        $config_file = $this->config_path.'/database.yml';
831 831
         $db_config = Yaml::parse(file_get_contents($config_file));
832 832
 
833 833
         $this->setPDO();
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
         }
840 840
 
841 841
         if ($db_config['database']['driver'] === 'pdo_mysql') {
842
-            $db_ver = 'MySQL:' . $version;
842
+            $db_ver = 'MySQL:'.$version;
843 843
         } else {
844 844
             $db_ver = $version;
845 845
         }
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 
858 858
         $header = array(
859 859
             'Content-Type: application/x-www-form-urlencoded',
860
-            'Content-Length: ' . strlen($data),
860
+            'Content-Length: '.strlen($data),
861 861
         );
862 862
         $context = stream_context_create(
863 863
             array(
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
     public function migration(InstallApplication $app, Request $request)
885 885
     {
886 886
         return $app['twig']->render('migration.twig', array(
887
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
887
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
888 888
         ));
889 889
     }
890 890
 
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
             return $app['twig']->render('migration_plugin.twig', array(
914 914
                     'Plugins' => $Plugins,
915 915
                     'version' => Constant::VERSION,
916
-                    'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
916
+                    'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
917 917
             ));
918 918
         }
919 919
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
         \Eccube\Util\Cache::clear($config_app, true);
937 937
 
938 938
         return $app['twig']->render('migration_end.twig', array(
939
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
939
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
940 940
         ));
941 941
     }
942 942
 }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ProductController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                     }
203 203
 
204 204
                     $extension = $image->getClientOriginalExtension();
205
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
205
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
206 206
                     $image->move($app['config']['image_temp_realdir'], $filename);
207 207
                     $files[] = $filename;
208 208
                 }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $form = $builder->getForm();
279 279
 
280 280
         if (!$has_class) {
281
-            $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited());
281
+            $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited());
282 282
             $form['class']->setData($ProductClass);
283 283
         }
284 284
 
@@ -364,8 +364,8 @@  discard block
 block discarded – undo
364 364
                 $Categories = $form->get('Category')->getData();
365 365
                 $categoriesIdList = array();
366 366
                 foreach ($Categories as $Category) {
367
-                    foreach($Category->getPath() as $ParentCategory){
368
-                        if (!isset($categoriesIdList[$ParentCategory->getId()])){
367
+                    foreach ($Category->getPath() as $ParentCategory) {
368
+                        if (!isset($categoriesIdList[$ParentCategory->getId()])) {
369 369
                             $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count);
370 370
                             $app['orm.em']->persist($ProductCategory);
371 371
                             $count++;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
                             $categoriesIdList[$ParentCategory->getId()] = true;
375 375
                         }
376 376
                     }
377
-                    if (!isset($categoriesIdList[$Category->getId()])){
377
+                    if (!isset($categoriesIdList[$Category->getId()])) {
378 378
                         $ProductCategory = $this->createProductCategory($Product, $Category, $count);
379 379
                         $app['orm.em']->persist($ProductCategory);
380 380
                         $count++;
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
                     $app['orm.em']->persist($ProductImage);
397 397
 
398 398
                     // 移動
399
-                    $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image);
399
+                    $file = new File($app['config']['image_temp_realdir'].'/'.$add_image);
400 400
                     $file->move($app['config']['image_save_realdir']);
401 401
                 }
402 402
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 
417 417
                     // 削除
418 418
                     $fs = new Filesystem();
419
-                    $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image);
419
+                    $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image);
420 420
                 }
421 421
                 $app['orm.em']->persist($Product);
422 422
                 $app['orm.em']->flush();
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
                 foreach ($deleteImages as $deleteImage) {
577 577
                     try {
578 578
                         $fs = new Filesystem();
579
-                        $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage);
579
+                        $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage);
580 580
                     } catch (\Exception $e) {
581 581
                         // エラーが発生しても無視する
582 582
                     }
@@ -646,10 +646,10 @@  discard block
 block discarded – undo
646 646
 
647 647
                     // 画像ファイルを新規作成
648 648
                     $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION);
649
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
649
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
650 650
                     try {
651 651
                         $fs = new Filesystem();
652
-                        $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename);
652
+                        $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename);
653 653
                     } catch (\Exception $e) {
654 654
                         // エラーが発生しても無視する
655 655
                     }
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
         $em->getConfiguration()->setSQLLogger(null);
725 725
 
726 726
         $response = new StreamedResponse();
727
-        $response->setCallback(function () use ($app, $request) {
727
+        $response->setCallback(function() use ($app, $request) {
728 728
 
729 729
             // CSV種別を元に初期化.
730 730
             $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT);
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
 
749 749
             // データ行の出力.
750 750
             $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
751
-            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) {
751
+            $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) {
752 752
 
753 753
                 $Csvs = $csvService->getCsvs();
754 754
 
@@ -792,9 +792,9 @@  discard block
 block discarded – undo
792 792
         });
793 793
 
794 794
         $now = new \DateTime();
795
-        $filename = 'product_' . $now->format('YmdHis') . '.csv';
795
+        $filename = 'product_'.$now->format('YmdHis').'.csv';
796 796
         $response->headers->set('Content-Type', 'application/octet-stream');
797
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
797
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
798 798
         $response->send();
799 799
 
800 800
         log_info('商品CSV出力ファイル名', array($filename));
Please login to merge, or discard this patch.