@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | $extension = $image->getClientOriginalExtension(); |
322 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
322 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
323 | 323 | $image->move($this->appConfig['image_temp_realdir'], $filename); |
324 | 324 | $files[] = $filename; |
325 | 325 | } |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $form = $builder->getForm(); |
401 | 401 | |
402 | 402 | if (!$has_class) { |
403 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
403 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
404 | 404 | $form['class']->setData($ProductClass); |
405 | 405 | } |
406 | 406 | |
@@ -486,8 +486,8 @@ discard block |
||
486 | 486 | $Categories = $form->get('Category')->getData(); |
487 | 487 | $categoriesIdList = array(); |
488 | 488 | foreach ($Categories as $Category) { |
489 | - foreach($Category->getPath() as $ParentCategory){ |
|
490 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
489 | + foreach ($Category->getPath() as $ParentCategory) { |
|
490 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
491 | 491 | $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); |
492 | 492 | $this->entityManager->persist($ProductCategory); |
493 | 493 | $count++; |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | $categoriesIdList[$ParentCategory->getId()] = true; |
497 | 497 | } |
498 | 498 | } |
499 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
499 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
500 | 500 | $ProductCategory = $this->createProductCategory($Product, $Category, $count); |
501 | 501 | $this->entityManager->persist($ProductCategory); |
502 | 502 | $count++; |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $this->entityManager->persist($ProductImage); |
519 | 519 | |
520 | 520 | // 移動 |
521 | - $file = new File($this->appConfig['image_temp_realdir'] . '/' . $add_image); |
|
521 | + $file = new File($this->appConfig['image_temp_realdir'].'/'.$add_image); |
|
522 | 522 | $file->move($this->appConfig['image_save_realdir']); |
523 | 523 | } |
524 | 524 | |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | |
539 | 539 | // 削除 |
540 | 540 | $fs = new Filesystem(); |
541 | - $fs->remove($this->appConfig['image_save_realdir'] . '/' . $delete_image); |
|
541 | + $fs->remove($this->appConfig['image_save_realdir'].'/'.$delete_image); |
|
542 | 542 | } |
543 | 543 | $this->entityManager->persist($Product); |
544 | 544 | $this->entityManager->flush(); |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | foreach ($deleteImages as $deleteImage) { |
703 | 703 | try { |
704 | 704 | $fs = new Filesystem(); |
705 | - $fs->remove($this->appConfig['image_save_realdir'] . '/' . $deleteImage); |
|
705 | + $fs->remove($this->appConfig['image_save_realdir'].'/'.$deleteImage); |
|
706 | 706 | } catch (\Exception $e) { |
707 | 707 | // エラーが発生しても無視する |
708 | 708 | } |
@@ -776,10 +776,10 @@ discard block |
||
776 | 776 | |
777 | 777 | // 画像ファイルを新規作成 |
778 | 778 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
779 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
779 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
780 | 780 | try { |
781 | 781 | $fs = new Filesystem(); |
782 | - $fs->copy($this->appConfig['image_save_realdir'] . '/' . $Image->getFileName(), $this->appConfig['image_save_realdir'] . '/' . $filename); |
|
782 | + $fs->copy($this->appConfig['image_save_realdir'].'/'.$Image->getFileName(), $this->appConfig['image_save_realdir'].'/'.$filename); |
|
783 | 783 | } catch (\Exception $e) { |
784 | 784 | // エラーが発生しても無視する |
785 | 785 | } |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | $em->getConfiguration()->setSQLLogger(null); |
860 | 860 | |
861 | 861 | $response = new StreamedResponse(); |
862 | - $response->setCallback(function () use ($app, $request) { |
|
862 | + $response->setCallback(function() use ($app, $request) { |
|
863 | 863 | |
864 | 864 | // CSV種別を元に初期化. |
865 | 865 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | // データ行の出力. |
900 | 900 | $this->csvExportService->setExportQueryBuilder($qb); |
901 | 901 | |
902 | - $this->csvExportService->exportData(function ($entity, CsvExportService $csvService) use ($app, $request) { |
|
902 | + $this->csvExportService->exportData(function($entity, CsvExportService $csvService) use ($app, $request) { |
|
903 | 903 | $Csvs = $csvService->getCsvs(); |
904 | 904 | |
905 | 905 | /** @var $Product \Eccube\Entity\Product */ |
@@ -942,9 +942,9 @@ discard block |
||
942 | 942 | }); |
943 | 943 | |
944 | 944 | $now = new \DateTime(); |
945 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
945 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
946 | 946 | $response->headers->set('Content-Type', 'application/octet-stream'); |
947 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
947 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
948 | 948 | $response->send(); |
949 | 949 | |
950 | 950 | log_info('商品CSV出力ファイル名', array($filename)); |
@@ -187,7 +187,7 @@ |
||
187 | 187 | // ダウンロード完了後にファイルを削除する. |
188 | 188 | // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony |
189 | 189 | $app->finish( |
190 | - function (Request $request, Response $response, \Silex\Application $app) use ( |
|
190 | + function(Request $request, Response $response, \Silex\Application $app) use ( |
|
191 | 191 | $tmpDir, |
192 | 192 | $tarFile, |
193 | 193 | $tarGzFile |
@@ -690,7 +690,7 @@ |
||
690 | 690 | [ |
691 | 691 | 'label' => '認証キー', |
692 | 692 | 'constraints' => [ |
693 | - new Assert\Regex(['pattern' => "/^[0-9a-zA-Z]+$/",]), |
|
693 | + new Assert\Regex(['pattern' => "/^[0-9a-zA-Z]+$/", ]), |
|
694 | 694 | ], |
695 | 695 | ] |
696 | 696 | ); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $em->getConfiguration()->setSQLLogger(null); |
350 | 350 | |
351 | 351 | $response = new StreamedResponse(); |
352 | - $response->setCallback(function () use ($app, $request) { |
|
352 | + $response->setCallback(function() use ($app, $request) { |
|
353 | 353 | |
354 | 354 | // CSV種別を元に初期化. |
355 | 355 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_ORDER); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | |
364 | 364 | // データ行の出力. |
365 | 365 | $this->csvExportService->setExportQueryBuilder($qb); |
366 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
366 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
367 | 367 | |
368 | 368 | $Csvs = $csvService->getCsvs(); |
369 | 369 | |
@@ -404,9 +404,9 @@ discard block |
||
404 | 404 | }); |
405 | 405 | |
406 | 406 | $now = new \DateTime(); |
407 | - $filename = 'order_' . $now->format('YmdHis') . '.csv'; |
|
407 | + $filename = 'order_'.$now->format('YmdHis').'.csv'; |
|
408 | 408 | $response->headers->set('Content-Type', 'application/octet-stream'); |
409 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
409 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
410 | 410 | $response->send(); |
411 | 411 | |
412 | 412 | log_info('受注CSV出力ファイル名', array($filename)); |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $em->getConfiguration()->setSQLLogger(null); |
434 | 434 | |
435 | 435 | $response = new StreamedResponse(); |
436 | - $response->setCallback(function () use ($app, $request) { |
|
436 | + $response->setCallback(function() use ($app, $request) { |
|
437 | 437 | |
438 | 438 | // CSV種別を元に初期化. |
439 | 439 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_SHIPPING); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | |
448 | 448 | // データ行の出力. |
449 | 449 | $this->csvExportService->setExportQueryBuilder($qb); |
450 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
450 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
451 | 451 | |
452 | 452 | $Csvs = $csvService->getCsvs(); |
453 | 453 | |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | }); |
498 | 498 | |
499 | 499 | $now = new \DateTime(); |
500 | - $filename = 'shipping_' . $now->format('YmdHis') . '.csv'; |
|
500 | + $filename = 'shipping_'.$now->format('YmdHis').'.csv'; |
|
501 | 501 | $response->headers->set('Content-Type', 'application/octet-stream'); |
502 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
502 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
503 | 503 | $response->send(); |
504 | 504 | |
505 | 505 | log_info('配送CSV出力ファイル名', array($filename)); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } else { |
101 | 101 | // httpから変更されたらfalseのまま |
102 | 102 | $config['force_ssl'] = Constant::DISABLED; |
103 | - $data['force_ssl'] = (bool)Constant::DISABLED; |
|
103 | + $data['force_ssl'] = (bool) Constant::DISABLED; |
|
104 | 104 | } |
105 | 105 | } else { |
106 | 106 | $config['force_ssl'] = Constant::DISABLED; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | if (count($allowHost) > 0) { |
162 | 162 | $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost))); |
163 | 163 | } |
164 | - $form->get('force_ssl')->setData((bool)$this->appConfig['force_ssl']); |
|
164 | + $form->get('force_ssl')->setData((bool) $this->appConfig['force_ssl']); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | return [ |
@@ -174,7 +174,7 @@ |
||
174 | 174 | $entity = new $entityName(); |
175 | 175 | $rank = 0; |
176 | 176 | $ids = array_map( |
177 | - function ($v) { |
|
177 | + function($v) { |
|
178 | 178 | return $v['id']; |
179 | 179 | }, |
180 | 180 | $data['data'] |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | const SESSION_KEY = 'eccube.session.install'; |
54 | 54 | public function __construct() |
55 | 55 | { |
56 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
57 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
58 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
56 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
57 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
58 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
59 | 59 | } |
60 | 60 | private function isValid(Request $request, Form $form) |
61 | 61 | { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $this->checkModules($app); |
96 | 96 | return $app['twig']->render('step1.twig', array( |
97 | 97 | 'form' => $form->createView(), |
98 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
98 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
99 | 99 | )); |
100 | 100 | } |
101 | 101 | // 権限チェック |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | return $app['twig']->render('step2.twig', array( |
116 | 116 | 'protectedDirs' => $protectedDirs, |
117 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
117 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
118 | 118 | )); |
119 | 119 | } |
120 | 120 | // サイトの設定 |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ->getForm(); |
126 | 126 | $sessionData = $this->getSessionData($request); |
127 | 127 | if (empty($sessionData['shop_name'])) { |
128 | - $config_file = $this->config_path . '/config.yml'; |
|
128 | + $config_file = $this->config_path.'/config.yml'; |
|
129 | 129 | $fs = new Filesystem(); |
130 | 130 | if ($fs->exists($config_file)) { |
131 | 131 | // すでに登録されていた場合、登録データを表示 |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | $sessionData['email'] = $row['email01']; |
137 | 137 | } |
138 | 138 | // セキュリティの設定 |
139 | - $config_file = $this->config_path . '/path.yml'; |
|
139 | + $config_file = $this->config_path.'/path.yml'; |
|
140 | 140 | $config = Yaml::parse(file_get_contents($config_file)); |
141 | 141 | $sessionData['admin_dir'] = $config['admin_route']; |
142 | - $config_file = $this->config_path . '/config.yml'; |
|
142 | + $config_file = $this->config_path.'/config.yml'; |
|
143 | 143 | $config = Yaml::parse(file_get_contents($config_file)); |
144 | 144 | $allowHost = $config['admin_allow_host']; |
145 | 145 | if (count($allowHost) > 0) { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
149 | 149 | // ロードバランサー、プロキシサーバ設定 |
150 | 150 | if (isset($config['trusted_proxies_connection_only'])) { |
151 | - $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only']; |
|
151 | + $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only']; |
|
152 | 152 | } |
153 | 153 | if (isset($config['trusted_proxies'])) { |
154 | 154 | $trustedProxies = $config['trusted_proxies']; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | // メール設定 |
160 | - $config_file = $this->config_path . '/mail.yml'; |
|
160 | + $config_file = $this->config_path.'/mail.yml'; |
|
161 | 161 | $config = Yaml::parse(file_get_contents($config_file)); |
162 | 162 | $mail = $config['mail']; |
163 | 163 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | return $app['twig']->render('step3.twig', array( |
179 | 179 | 'form' => $form->createView(), |
180 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
180 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
181 | 181 | )); |
182 | 182 | } |
183 | 183 | // データベースの設定 |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | ->getForm(); |
189 | 189 | $sessionData = $this->getSessionData($request); |
190 | 190 | if (empty($sessionData['database'])) { |
191 | - $config_file = $this->config_path . '/database.yml'; |
|
191 | + $config_file = $this->config_path.'/database.yml'; |
|
192 | 192 | $fs = new Filesystem(); |
193 | 193 | if ($fs->exists($config_file)) { |
194 | 194 | // すでに登録されていた場合、登録データを表示 |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | } |
212 | 212 | return $app['twig']->render('step4.twig', array( |
213 | 213 | 'form' => $form->createView(), |
214 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
214 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
215 | 215 | )); |
216 | 216 | } |
217 | 217 | // データベースの初期化 |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $host = $request->getSchemeAndHttpHost(); |
251 | 251 | $basePath = $request->getBasePath(); |
252 | 252 | $params = array( |
253 | - 'http_url' => $host . $basePath, |
|
253 | + 'http_url' => $host.$basePath, |
|
254 | 254 | 'shop_name' => $sessionData['shop_name'], |
255 | 255 | ); |
256 | 256 | $this->sendAppData($params); |
@@ -261,15 +261,15 @@ discard block |
||
261 | 261 | } |
262 | 262 | return $app['twig']->render('step5.twig', array( |
263 | 263 | 'form' => $form->createView(), |
264 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
264 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
265 | 265 | )); |
266 | 266 | } |
267 | 267 | // インストール完了 |
268 | 268 | public function complete(InstallApplication $app, Request $request) |
269 | 269 | { |
270 | - $config_yml = $this->config_path . '/config.yml'; |
|
270 | + $config_yml = $this->config_path.'/config.yml'; |
|
271 | 271 | $config = Yaml::parse(file_get_contents($config_yml)); |
272 | - $config_path = $this->config_path . '/path.yml'; |
|
272 | + $config_path = $this->config_path.'/path.yml'; |
|
273 | 273 | $path_yml = Yaml::parse(file_get_contents($config_path)); |
274 | 274 | $config = array_replace_recursive($path_yml, $config); |
275 | 275 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
@@ -279,10 +279,10 @@ discard block |
||
279 | 279 | } |
280 | 280 | $host = $request->getSchemeAndHttpHost(); |
281 | 281 | $basePath = $request->getBasePath(); |
282 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
282 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
283 | 283 | return $app['twig']->render('complete.twig', array( |
284 | 284 | 'admin_url' => $adminUrl, |
285 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
285 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
286 | 286 | )); |
287 | 287 | } |
288 | 288 | private function resetNatTimer() |
@@ -296,11 +296,11 @@ discard block |
||
296 | 296 | { |
297 | 297 | foreach ($this->required_modules as $module) { |
298 | 298 | if (!extension_loaded($module)) { |
299 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
299 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
303 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
303 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
304 | 304 | } |
305 | 305 | foreach ($this->recommended_module as $module) { |
306 | 306 | if (!extension_loaded($module)) { |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | if (!function_exists('apache_get_modules')) { |
326 | 326 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
327 | 327 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
328 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
328 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
329 | 329 | } |
330 | 330 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
331 | 331 | // iis |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | } |
336 | 336 | private function setPDO() |
337 | 337 | { |
338 | - $config_file = $this->config_path . '/database.yml'; |
|
338 | + $config_file = $this->config_path.'/database.yml'; |
|
339 | 339 | $config = Yaml::parse(file_get_contents($config_file)); |
340 | 340 | try { |
341 | 341 | $this->PDO = \Doctrine\DBAL\DriverManager::getConnection($config['database'], new \Doctrine\DBAL\Configuration()); |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | private function getEntityManager() |
363 | 363 | { |
364 | 364 | if (!isset($this->app['orm.em'])) { |
365 | - $config_file = $this->config_path . '/database.yml'; |
|
365 | + $config_file = $this->config_path.'/database.yml'; |
|
366 | 366 | $database = Yaml::parse(file_get_contents($config_file)); |
367 | 367 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
368 | 368 | 'db.options' => $database['database'] |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | 'type' => 'annotation', |
373 | 373 | 'namespace' => 'Eccube\Entity', |
374 | 374 | 'path' => array( |
375 | - __DIR__ . '/../../Entity', |
|
375 | + __DIR__.'/../../Entity', |
|
376 | 376 | ), |
377 | 377 | 'use_simple_annotation_reader' => false, |
378 | 378 | ), |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | } |
406 | 406 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
407 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
407 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
408 | 408 | 'orm.em.options' => array( |
409 | 409 | 'mappings' => $ormMappings |
410 | 410 | ) |
@@ -433,10 +433,10 @@ discard block |
||
433 | 433 | private function insert() |
434 | 434 | { |
435 | 435 | $this->resetNatTimer(); |
436 | - $config_file = $this->config_path . '/database.yml'; |
|
436 | + $config_file = $this->config_path.'/database.yml'; |
|
437 | 437 | $database = Yaml::parse(file_get_contents($config_file)); |
438 | 438 | $config['database'] = $database['database']; |
439 | - $config_file = $this->config_path . '/config.yml'; |
|
439 | + $config_file = $this->config_path.'/config.yml'; |
|
440 | 440 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
441 | 441 | $config['config'] = $baseConfig; |
442 | 442 | $this->PDO->beginTransaction(); |
@@ -485,10 +485,10 @@ discard block |
||
485 | 485 | private function update() |
486 | 486 | { |
487 | 487 | $this->resetNatTimer(); |
488 | - $config_file = $this->config_path . '/database.yml'; |
|
488 | + $config_file = $this->config_path.'/database.yml'; |
|
489 | 489 | $database = Yaml::parse(file_get_contents($config_file)); |
490 | 490 | $config['database'] = $database['database']; |
491 | - $config_file = $this->config_path . '/config.yml'; |
|
491 | + $config_file = $this->config_path.'/config.yml'; |
|
492 | 492 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
493 | 493 | $config['config'] = $baseConfig; |
494 | 494 | $this->PDO->beginTransaction(); |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | $app->boot(); |
540 | 540 | $config = new Configuration($app['db']); |
541 | 541 | $config->setMigrationsNamespace('DoctrineMigrations'); |
542 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
542 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
543 | 543 | $config->setMigrationsDirectory($migrationDir); |
544 | 544 | $config->registerMigrationsFromDirectory($migrationDir); |
545 | 545 | $migration = new Migration($config); |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | private function getProtectedDirs() |
566 | 566 | { |
567 | 567 | $protectedDirs = array(); |
568 | - $base = __DIR__ . '/../../../..'; |
|
568 | + $base = __DIR__.'/../../../..'; |
|
569 | 569 | $dirs = array( |
570 | 570 | '/html', |
571 | 571 | '/app', |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | '/app/Plugin', |
578 | 578 | ); |
579 | 579 | foreach ($dirs as $dir) { |
580 | - if (!is_writable($base . $dir)) { |
|
580 | + if (!is_writable($base.$dir)) { |
|
581 | 581 | $protectedDirs[] = $dir; |
582 | 582 | } |
583 | 583 | } |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | private function createConfigYamlFile($data, $auth = true) |
587 | 587 | { |
588 | 588 | $fs = new Filesystem(); |
589 | - $config_file = $this->config_path . '/config.yml'; |
|
589 | + $config_file = $this->config_path.'/config.yml'; |
|
590 | 590 | if ($fs->exists($config_file)) { |
591 | 591 | $config = Yaml::parse(file_get_contents($config_file)); |
592 | 592 | $fs->remove($config_file); |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | $replace = array($auth_magic, $data['shop_name'], '0', $data['admin_force_ssl']); |
623 | 623 | $fs = new Filesystem(); |
624 | 624 | $content = str_replace( |
625 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
625 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
626 | 626 | ); |
627 | 627 | $fs->dumpFile($config_file, $content); |
628 | 628 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | } |
636 | 636 | private function addInstallStatus() |
637 | 637 | { |
638 | - $config_file = $this->config_path . '/config.yml'; |
|
638 | + $config_file = $this->config_path.'/config.yml'; |
|
639 | 639 | $config = Yaml::parse(file_get_contents($config_file)); |
640 | 640 | $config['eccube_install'] = 1; |
641 | 641 | $yml = Yaml::dump($config); |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | private function createDatabaseYamlFile($data) |
646 | 646 | { |
647 | 647 | $fs = new Filesystem(); |
648 | - $config_file = $this->config_path . '/database.yml'; |
|
648 | + $config_file = $this->config_path.'/database.yml'; |
|
649 | 649 | if ($fs->exists($config_file)) { |
650 | 650 | $fs->remove($config_file); |
651 | 651 | } |
@@ -676,14 +676,14 @@ discard block |
||
676 | 676 | ); |
677 | 677 | $fs = new Filesystem(); |
678 | 678 | $content = str_replace( |
679 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
679 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
680 | 680 | ); |
681 | 681 | } else { |
682 | 682 | $content = Yaml::dump( |
683 | 683 | array( |
684 | 684 | 'database' => array( |
685 | 685 | 'driver' => 'pdo_sqlite', |
686 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
686 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
687 | 687 | ) |
688 | 688 | ) |
689 | 689 | ); |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | private function createMailYamlFile($data) |
695 | 695 | { |
696 | 696 | $fs = new Filesystem(); |
697 | - $config_file = $this->config_path . '/mail.yml'; |
|
697 | + $config_file = $this->config_path.'/mail.yml'; |
|
698 | 698 | if ($fs->exists($config_file)) { |
699 | 699 | $fs->remove($config_file); |
700 | 700 | } |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | ); |
709 | 709 | $fs = new Filesystem(); |
710 | 710 | $content = str_replace( |
711 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
711 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
712 | 712 | ); |
713 | 713 | $fs->dumpFile($config_file, $content); |
714 | 714 | return $this; |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | private function createPathYamlFile($data, Request $request) |
717 | 717 | { |
718 | 718 | $fs = new Filesystem(); |
719 | - $config_file = $this->config_path . '/path.yml'; |
|
719 | + $config_file = $this->config_path.'/path.yml'; |
|
720 | 720 | if ($fs->exists($config_file)) { |
721 | 721 | $fs->remove($config_file); |
722 | 722 | } |
@@ -725,19 +725,19 @@ discard block |
||
725 | 725 | $USER_DATA_ROUTE = 'user_data'; |
726 | 726 | $ROOT_DIR = '%ROOT_DIR%'; |
727 | 727 | $ROOT_URLPATH = $request->getBasePath(); |
728 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
728 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
729 | 729 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
730 | 730 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
731 | 731 | $fs = new Filesystem(); |
732 | 732 | $content = str_replace( |
733 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
733 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
734 | 734 | ); |
735 | 735 | $fs->dumpFile($config_file, $content); |
736 | 736 | return $this; |
737 | 737 | } |
738 | 738 | private function sendAppData($params) |
739 | 739 | { |
740 | - $config_file = $this->config_path . '/database.yml'; |
|
740 | + $config_file = $this->config_path.'/database.yml'; |
|
741 | 741 | $db_config = Yaml::parse(file_get_contents($config_file)); |
742 | 742 | $this->setPDO(); |
743 | 743 | $stmt = $this->PDO->query('select version() as v'); |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | $version = $row['v']; |
747 | 747 | } |
748 | 748 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
749 | - $db_ver = 'MySQL:' . $version; |
|
749 | + $db_ver = 'MySQL:'.$version; |
|
750 | 750 | } else { |
751 | 751 | $db_ver = $version; |
752 | 752 | } |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | ); |
763 | 763 | $header = array( |
764 | 764 | 'Content-Type: application/x-www-form-urlencoded', |
765 | - 'Content-Length: ' . strlen($data), |
|
765 | + 'Content-Length: '.strlen($data), |
|
766 | 766 | ); |
767 | 767 | $context = stream_context_create( |
768 | 768 | array( |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | public function migration(InstallApplication $app, Request $request) |
788 | 788 | { |
789 | 789 | return $app['twig']->render('migration.twig', array( |
790 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
790 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
791 | 791 | )); |
792 | 792 | } |
793 | 793 | /** |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | return $app['twig']->render('migration_plugin.twig', array( |
814 | 814 | 'Plugins' => $Plugins, |
815 | 815 | 'version' => Constant::VERSION, |
816 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
816 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
817 | 817 | )); |
818 | 818 | } |
819 | 819 | } |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | $config_app->boot(); |
834 | 834 | \Eccube\Util\Cache::clear($config_app, true); |
835 | 835 | return $app['twig']->render('migration_end.twig', array( |
836 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
836 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
837 | 837 | )); |
838 | 838 | } |
839 | 839 | } |
840 | 840 | \ No newline at end of file |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | // 配送業者のプルダウンを生成 |
76 | 76 | $builder->addEventListener( |
77 | 77 | FormEvents::PRE_SET_DATA, |
78 | - function (FormEvent $event) { |
|
78 | + function(FormEvent $event) { |
|
79 | 79 | /* @var Shipping $Shipping */ |
80 | 80 | $Shipping = $event->getData(); |
81 | 81 | if (is_null($Shipping) || !$Shipping->getId()) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | // お届け日のプルダウンを生成 |
118 | 118 | $builder->addEventListener( |
119 | 119 | FormEvents::PRE_SET_DATA, |
120 | - function (FormEvent $event) { |
|
120 | + function(FormEvent $event) { |
|
121 | 121 | $Shipping = $event->getData(); |
122 | 122 | if (is_null($Shipping) || !$Shipping->getId()) { |
123 | 123 | return; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | // 配送日数が設定されている |
157 | 157 | if ($deliveryDateFlag) { |
158 | - $period = new \DatePeriod ( |
|
158 | + $period = new \DatePeriod( |
|
159 | 159 | new \DateTime($minDate.' day'), |
160 | 160 | new \DateInterval('P1D'), |
161 | 161 | new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day') |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | // お届け時間のプルダウンを生成 |
184 | 184 | $builder->addEventListener( |
185 | 185 | FormEvents::PRE_SET_DATA, |
186 | - function (FormEvent $event) { |
|
186 | + function(FormEvent $event) { |
|
187 | 187 | $Shipping = $event->getData(); |
188 | 188 | if (is_null($Shipping) || !$Shipping->getId()) { |
189 | 189 | return; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $max = $this->appConfig['price_max']; |
57 | 57 | $min = -$max; |
58 | 58 | |
59 | - $constraints = function (Options $options) use ($max, $min){ |
|
59 | + $constraints = function(Options $options) use ($max, $min){ |
|
60 | 60 | $constraints = []; |
61 | 61 | |
62 | 62 | // requiredがtrueに指定されている場合, NotBlankを追加 |