@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $config['template_realdir'] = $config['root_dir'].'/app/template/'.$templateCode; |
| 78 | 78 | $config['template_html_realdir'] = $config['public_path_realdir'].'/template/'.$templateCode; |
| 79 | 79 | $config['front_urlpath'] = $config['root_urlpath'].'/template/'.$templateCode; |
| 80 | - $config['block_realdir'] =$config['template_realdir'].'/Block'; |
|
| 80 | + $config['block_realdir'] = $config['template_realdir'].'/Block'; |
|
| 81 | 81 | |
| 82 | 82 | if (file_exists($file.'.php')) { |
| 83 | 83 | file_put_contents($file.'.php', sprintf('<?php return %s', var_export($config, true)).';'); |
@@ -117,19 +117,19 @@ discard block |
||
| 117 | 117 | // 該当テンプレートのディレクトリ |
| 118 | 118 | $config = $app['config']; |
| 119 | 119 | $templateCode = $Template->getCode(); |
| 120 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 121 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 120 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 121 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 122 | 122 | |
| 123 | 123 | // 一時ディレクトリ |
| 124 | 124 | $uniqId = sha1(Str::random(32)); |
| 125 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
| 126 | - $appDir = $tmpDir . '/app'; |
|
| 127 | - $htmlDir = $tmpDir . '/html'; |
|
| 125 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
| 126 | + $appDir = $tmpDir.'/app'; |
|
| 127 | + $htmlDir = $tmpDir.'/html'; |
|
| 128 | 128 | |
| 129 | 129 | // ファイル名 |
| 130 | - $tarFile = $config['template_temp_realdir'] . '/' . $uniqId . '.tar'; |
|
| 131 | - $tarGzFile = $tarFile . '.gz'; |
|
| 132 | - $downloadFileName = $Template->getCode() . '.tar.gz'; |
|
| 130 | + $tarFile = $config['template_temp_realdir'].'/'.$uniqId.'.tar'; |
|
| 131 | + $tarGzFile = $tarFile.'.gz'; |
|
| 132 | + $downloadFileName = $Template->getCode().'.tar.gz'; |
|
| 133 | 133 | |
| 134 | 134 | // 該当テンプレートを一時ディレクトリへコピーする. |
| 135 | 135 | $fs = new Filesystem(); |
@@ -149,14 +149,14 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | // ダウンロード完了後にファイルを削除する. |
| 151 | 151 | // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony |
| 152 | - $app->finish(function (Request $request, Response $response, \Silex\Application $app) use ( |
|
| 152 | + $app->finish(function(Request $request, Response $response, \Silex\Application $app) use ( |
|
| 153 | 153 | $tmpDir, |
| 154 | 154 | $tarFile, |
| 155 | 155 | $tarGzFile |
| 156 | 156 | ) { |
| 157 | - $app['monolog']->addDebug('remove temp file: ' . $tmpDir); |
|
| 158 | - $app['monolog']->addDebug('remove temp file: ' . $tarFile); |
|
| 159 | - $app['monolog']->addDebug('remove temp file: ' . $tarGzFile); |
|
| 157 | + $app['monolog']->addDebug('remove temp file: '.$tmpDir); |
|
| 158 | + $app['monolog']->addDebug('remove temp file: '.$tarFile); |
|
| 159 | + $app['monolog']->addDebug('remove temp file: '.$tarGzFile); |
|
| 160 | 160 | $fs = new Filesystem(); |
| 161 | 161 | $fs->remove($tmpDir); |
| 162 | 162 | $fs->remove($tarFile); |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | // テンプレートディレクトリの削除 |
| 198 | 198 | $config = $app['config']; |
| 199 | 199 | $templateCode = $Template->getCode(); |
| 200 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 201 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 200 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 201 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 202 | 202 | |
| 203 | 203 | $fs = new Filesystem(); |
| 204 | 204 | $fs->remove($targetRealDir); |
@@ -241,18 +241,18 @@ discard block |
||
| 241 | 241 | // 該当テンプレートのディレクトリ |
| 242 | 242 | $config = $app['config']; |
| 243 | 243 | $templateCode = $Template->getCode(); |
| 244 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 245 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 244 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 245 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 246 | 246 | |
| 247 | 247 | // 一時ディレクトリ |
| 248 | 248 | $uniqId = sha1(Str::random(32)); |
| 249 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
| 250 | - $appDir = $tmpDir . '/app'; |
|
| 251 | - $htmlDir = $tmpDir . '/html'; |
|
| 249 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
| 250 | + $appDir = $tmpDir.'/app'; |
|
| 251 | + $htmlDir = $tmpDir.'/html'; |
|
| 252 | 252 | |
| 253 | 253 | $formFile = $form['file']->getData(); |
| 254 | 254 | // ファイル名 |
| 255 | - $archive = $templateCode . '.' . $formFile->getClientOriginalExtension(); |
|
| 255 | + $archive = $templateCode.'.'.$formFile->getClientOriginalExtension(); |
|
| 256 | 256 | |
| 257 | 257 | // ファイルを一時ディレクトリへ移動. |
| 258 | 258 | $formFile->move($tmpDir, $archive); |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | try { |
| 262 | 262 | if ($formFile->getClientOriginalExtension() == 'zip') { |
| 263 | 263 | $zip = new \ZipArchive(); |
| 264 | - $zip->open($tmpDir . '/' . $archive); |
|
| 264 | + $zip->open($tmpDir.'/'.$archive); |
|
| 265 | 265 | $zip->extractTo($tmpDir); |
| 266 | 266 | $zip->close(); |
| 267 | 267 | } else { |
| 268 | - $phar = new \PharData($tmpDir . '/' . $archive); |
|
| 268 | + $phar = new \PharData($tmpDir.'/'.$archive); |
|
| 269 | 269 | $phar->extractTo($tmpDir, null, true); |
| 270 | 270 | } |
| 271 | 271 | } catch (\Exception $e) { |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | if ($dir == 'doctrine') { |
| 60 | 60 | // doctrineが指定された場合は, cache driver経由で削除. |
| 61 | - $config = $app['orm.em']->getConfiguration(); |
|
| 61 | + $config = $app['orm.em']->getConfiguration(); |
|
| 62 | 62 | $this->deleteDoctrineCache($config->getMetadataCacheImpl()); |
| 63 | 63 | $this->deleteDoctrineCache($config->getQueryCacheImpl()); |
| 64 | 64 | $this->deleteDoctrineCache($config->getResultCacheImpl()); |
@@ -234,13 +234,13 @@ discard block |
||
| 234 | 234 | '\Eccube\Entity\Customer' |
| 235 | 235 | ))); |
| 236 | 236 | |
| 237 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
| 237 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
| 238 | 238 | |
| 239 | 239 | $data = $event->getData(); |
| 240 | 240 | $orderDetails = &$data['OrderDetails']; |
| 241 | 241 | |
| 242 | 242 | // 数量0フィルター |
| 243 | - $quantityFilter = function ($v) { |
|
| 243 | + $quantityFilter = function($v) { |
|
| 244 | 244 | return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity']))); |
| 245 | 245 | }; |
| 246 | 246 | |
@@ -249,10 +249,9 @@ discard block |
||
| 249 | 249 | $shippings = &$data['Shippings']; |
| 250 | 250 | |
| 251 | 251 | // 数量を抽出 |
| 252 | - $getQuantity = function ($v) { |
|
| 252 | + $getQuantity = function($v) { |
|
| 253 | 253 | return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ? |
| 254 | - trim($v['quantity']) : |
|
| 255 | - 0; |
|
| 254 | + trim($v['quantity']) : 0; |
|
| 256 | 255 | }; |
| 257 | 256 | |
| 258 | 257 | foreach ($shippings as &$shipping) { |
@@ -268,7 +267,7 @@ discard block |
||
| 268 | 267 | $orderDetail['quantity'] = 0; |
| 269 | 268 | |
| 270 | 269 | // 受注詳細と同じ商品規格のみ抽出 |
| 271 | - $productClassFilter = function ($v) use ($orderDetail) { |
|
| 270 | + $productClassFilter = function($v) use ($orderDetail) { |
|
| 272 | 271 | return $orderDetail['ProductClass'] === $v['ProductClass']; |
| 273 | 272 | }; |
| 274 | 273 | |
@@ -277,10 +276,9 @@ discard block |
||
| 277 | 276 | if (!empty($shipping['ShipmentItems'])) { |
| 278 | 277 | |
| 279 | 278 | // 同じ商品規格の受注詳細の価格を適用 |
| 280 | - $applyPrice = function (&$v) use ($orderDetail) { |
|
| 279 | + $applyPrice = function(&$v) use ($orderDetail) { |
|
| 281 | 280 | $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ? |
| 282 | - $orderDetail['price'] : |
|
| 283 | - $v['price']; |
|
| 281 | + $orderDetail['price'] : $v['price']; |
|
| 284 | 282 | }; |
| 285 | 283 | array_walk($shipping['ShipmentItems'], $applyPrice); |
| 286 | 284 | |
@@ -300,7 +298,7 @@ discard block |
||
| 300 | 298 | |
| 301 | 299 | $event->setData($data); |
| 302 | 300 | }); |
| 303 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 301 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 304 | 302 | $form = $event->getForm(); |
| 305 | 303 | $orderDetails = $form['OrderDetails']->getData(); |
| 306 | 304 | if (empty($orderDetails) || count($orderDetails) < 1) { |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function __construct() |
| 62 | 62 | { |
| 63 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
| 64 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
| 65 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
| 63 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
| 64 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
| 65 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | private function isValid(Request $request, Form $form) |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | return $app['twig']->render('step1.twig', array( |
| 114 | 114 | 'form' => $form->createView(), |
| 115 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 115 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 116 | 116 | )); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | return $app['twig']->render('step2.twig', array( |
| 137 | 137 | 'protectedDirs' => $protectedDirs, |
| 138 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 138 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 139 | 139 | )); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | if (empty($sessionData['shop_name'])) { |
| 151 | 151 | |
| 152 | - $config_file = $this->config_path . '/config.yml'; |
|
| 152 | + $config_file = $this->config_path.'/config.yml'; |
|
| 153 | 153 | $fs = new Filesystem(); |
| 154 | 154 | |
| 155 | 155 | if ($fs->exists($config_file)) { |
@@ -163,21 +163,21 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // セキュリティの設定 |
| 166 | - $config_file = $this->config_path . '/path.yml'; |
|
| 166 | + $config_file = $this->config_path.'/path.yml'; |
|
| 167 | 167 | $config = Yaml::parse(file_get_contents($config_file)); |
| 168 | 168 | $sessionData['admin_dir'] = $config['admin_route']; |
| 169 | 169 | |
| 170 | - $config_file = $this->config_path . '/config.yml'; |
|
| 170 | + $config_file = $this->config_path.'/config.yml'; |
|
| 171 | 171 | $config = Yaml::parse(file_get_contents($config_file)); |
| 172 | 172 | |
| 173 | 173 | $allowHost = $config['admin_allow_host']; |
| 174 | 174 | if (count($allowHost) > 0) { |
| 175 | 175 | $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost)); |
| 176 | 176 | } |
| 177 | - $sessionData['admin_force_ssl'] = (bool)$config['force_ssl']; |
|
| 177 | + $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
|
| 178 | 178 | |
| 179 | 179 | // メール設定 |
| 180 | - $config_file = $this->config_path . '/mail.yml'; |
|
| 180 | + $config_file = $this->config_path.'/mail.yml'; |
|
| 181 | 181 | $config = Yaml::parse(file_get_contents($config_file)); |
| 182 | 182 | $mail = $config['mail']; |
| 183 | 183 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | return $app['twig']->render('step3.twig', array( |
| 202 | 202 | 'form' => $form->createView(), |
| 203 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 203 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 204 | 204 | )); |
| 205 | 205 | } |
| 206 | 206 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | return $app['twig']->render('step4.twig', array( |
| 246 | 246 | 'form' => $form->createView(), |
| 247 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 247 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 248 | 248 | )); |
| 249 | 249 | } |
| 250 | 250 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $host = $request->getSchemeAndHttpHost(); |
| 292 | 292 | $basePath = $request->getBasePath(); |
| 293 | 293 | $params = array( |
| 294 | - 'http_url' => $host . $basePath, |
|
| 294 | + 'http_url' => $host.$basePath, |
|
| 295 | 295 | 'shop_name' => $sessionData['shop_name'], |
| 296 | 296 | ); |
| 297 | 297 | |
@@ -306,24 +306,24 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | return $app['twig']->render('step5.twig', array( |
| 308 | 308 | 'form' => $form->createView(), |
| 309 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 309 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 310 | 310 | )); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | // インストール完了 |
| 314 | 314 | public function complete(InstallApplication $app, Request $request) |
| 315 | 315 | { |
| 316 | - $config_file = $this->config_path . '/path.yml'; |
|
| 316 | + $config_file = $this->config_path.'/path.yml'; |
|
| 317 | 317 | $config = Yaml::parse(file_get_contents($config_file)); |
| 318 | 318 | |
| 319 | 319 | $host = $request->getSchemeAndHttpHost(); |
| 320 | 320 | $basePath = $request->getBasePath(); |
| 321 | 321 | |
| 322 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
| 322 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
| 323 | 323 | |
| 324 | 324 | return $app['twig']->render('complete.twig', array( |
| 325 | 325 | 'admin_url' => $adminUrl, |
| 326 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 326 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 327 | 327 | )); |
| 328 | 328 | } |
| 329 | 329 | |
@@ -340,17 +340,17 @@ discard block |
||
| 340 | 340 | { |
| 341 | 341 | foreach ($this->required_modules as $module) { |
| 342 | 342 | if (!extension_loaded($module)) { |
| 343 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 343 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
| 348 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 348 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | foreach ($this->recommended_module as $module) { |
| 352 | 352 | if (!extension_loaded($module)) { |
| 353 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 353 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | 356 | |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | if (!function_exists('apache_get_modules')) { |
| 369 | 369 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
| 370 | 370 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
| 371 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
| 371 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
| 372 | 372 | } |
| 373 | 373 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
| 374 | 374 | // iis |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | |
| 380 | 380 | private function setPDO() |
| 381 | 381 | { |
| 382 | - $config_file = $this->config_path . '/database.yml'; |
|
| 382 | + $config_file = $this->config_path.'/database.yml'; |
|
| 383 | 383 | $config = Yaml::parse(file_get_contents($config_file)); |
| 384 | 384 | |
| 385 | 385 | try { |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | */ |
| 415 | 415 | private function getEntityManager() |
| 416 | 416 | { |
| 417 | - $config_file = $this->config_path . '/database.yml'; |
|
| 417 | + $config_file = $this->config_path.'/database.yml'; |
|
| 418 | 418 | $database = Yaml::parse(file_get_contents($config_file)); |
| 419 | 419 | |
| 420 | 420 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -422,15 +422,15 @@ discard block |
||
| 422 | 422 | )); |
| 423 | 423 | |
| 424 | 424 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
| 425 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
| 425 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
| 426 | 426 | 'orm.em.options' => array( |
| 427 | 427 | 'mappings' => array( |
| 428 | 428 | array( |
| 429 | 429 | 'type' => 'yml', |
| 430 | 430 | 'namespace' => 'Eccube\Entity', |
| 431 | 431 | 'path' => array( |
| 432 | - __DIR__ . '/../../Resource/doctrine', |
|
| 433 | - __DIR__ . '/../../Resource/doctrine/master', |
|
| 432 | + __DIR__.'/../../Resource/doctrine', |
|
| 433 | + __DIR__.'/../../Resource/doctrine/master', |
|
| 434 | 434 | ), |
| 435 | 435 | ), |
| 436 | 436 | |
@@ -458,11 +458,11 @@ discard block |
||
| 458 | 458 | { |
| 459 | 459 | $this->resetNatTimer(); |
| 460 | 460 | |
| 461 | - $config_file = $this->config_path . '/database.yml'; |
|
| 461 | + $config_file = $this->config_path.'/database.yml'; |
|
| 462 | 462 | $database = Yaml::parse(file_get_contents($config_file)); |
| 463 | 463 | $config['database'] = $database['database']; |
| 464 | 464 | |
| 465 | - $config_file = $this->config_path . '/config.yml'; |
|
| 465 | + $config_file = $this->config_path.'/config.yml'; |
|
| 466 | 466 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
| 467 | 467 | $config['config'] = $baseConfig; |
| 468 | 468 | |
@@ -518,11 +518,11 @@ discard block |
||
| 518 | 518 | { |
| 519 | 519 | $this->resetNatTimer(); |
| 520 | 520 | |
| 521 | - $config_file = $this->config_path . '/database.yml'; |
|
| 521 | + $config_file = $this->config_path.'/database.yml'; |
|
| 522 | 522 | $database = Yaml::parse(file_get_contents($config_file)); |
| 523 | 523 | $config['database'] = $database['database']; |
| 524 | 524 | |
| 525 | - $config_file = $this->config_path . '/config.yml'; |
|
| 525 | + $config_file = $this->config_path.'/config.yml'; |
|
| 526 | 526 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
| 527 | 527 | $config['config'] = $baseConfig; |
| 528 | 528 | |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | $config = new Configuration($app['db']); |
| 588 | 588 | $config->setMigrationsNamespace('DoctrineMigrations'); |
| 589 | 589 | |
| 590 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
| 590 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
| 591 | 591 | $config->setMigrationsDirectory($migrationDir); |
| 592 | 592 | $config->registerMigrationsFromDirectory($migrationDir); |
| 593 | 593 | |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | private function getProtectedDirs() |
| 619 | 619 | { |
| 620 | 620 | $protectedDirs = array(); |
| 621 | - $base = __DIR__ . '/../../../..'; |
|
| 621 | + $base = __DIR__.'/../../../..'; |
|
| 622 | 622 | $dirs = array( |
| 623 | 623 | '/html', |
| 624 | 624 | '/app', |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | ); |
| 632 | 632 | |
| 633 | 633 | foreach ($dirs as $dir) { |
| 634 | - if (!is_writable($base . $dir)) { |
|
| 634 | + if (!is_writable($base.$dir)) { |
|
| 635 | 635 | $protectedDirs[] = $dir; |
| 636 | 636 | } |
| 637 | 637 | } |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | private function createConfigYamlFile($data, $auth = true) |
| 643 | 643 | { |
| 644 | 644 | $fs = new Filesystem(); |
| 645 | - $config_file = $this->config_path . '/config.yml'; |
|
| 645 | + $config_file = $this->config_path.'/config.yml'; |
|
| 646 | 646 | |
| 647 | 647 | if ($fs->exists($config_file)) { |
| 648 | 648 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | $content = str_replace( |
| 674 | 674 | $target, |
| 675 | 675 | $replace, |
| 676 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
| 676 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
| 677 | 677 | ); |
| 678 | 678 | $fs->dumpFile($config_file, $content); |
| 679 | 679 | |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | private function addInstallStatus() |
| 689 | 689 | { |
| 690 | - $config_file = $this->config_path . '/config.yml'; |
|
| 690 | + $config_file = $this->config_path.'/config.yml'; |
|
| 691 | 691 | $config = Yaml::parse(file_get_contents($config_file)); |
| 692 | 692 | $config['eccube_install'] = 1; |
| 693 | 693 | $yml = Yaml::dump($config); |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | private function createDatabaseYamlFile($data) |
| 700 | 700 | { |
| 701 | 701 | $fs = new Filesystem(); |
| 702 | - $config_file = $this->config_path . '/database.yml'; |
|
| 702 | + $config_file = $this->config_path.'/database.yml'; |
|
| 703 | 703 | if ($fs->exists($config_file)) { |
| 704 | 704 | $fs->remove($config_file); |
| 705 | 705 | } |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | $content = str_replace( |
| 734 | 734 | $target, |
| 735 | 735 | $replace, |
| 736 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
| 736 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
| 737 | 737 | ); |
| 738 | 738 | |
| 739 | 739 | } else { |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | private function createMailYamlFile($data) |
| 755 | 755 | { |
| 756 | 756 | $fs = new Filesystem(); |
| 757 | - $config_file = $this->config_path . '/mail.yml'; |
|
| 757 | + $config_file = $this->config_path.'/mail.yml'; |
|
| 758 | 758 | if ($fs->exists($config_file)) { |
| 759 | 759 | $fs->remove($config_file); |
| 760 | 760 | } |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | $content = str_replace( |
| 772 | 772 | $target, |
| 773 | 773 | $replace, |
| 774 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
| 774 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
| 775 | 775 | ); |
| 776 | 776 | $fs->dumpFile($config_file, $content); |
| 777 | 777 | |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | private function createPathYamlFile($data, Request $request) |
| 782 | 782 | { |
| 783 | 783 | $fs = new Filesystem(); |
| 784 | - $config_file = $this->config_path . '/path.yml'; |
|
| 784 | + $config_file = $this->config_path.'/path.yml'; |
|
| 785 | 785 | if ($fs->exists($config_file)) { |
| 786 | 786 | $fs->remove($config_file); |
| 787 | 787 | } |
@@ -789,9 +789,9 @@ discard block |
||
| 789 | 789 | $ADMIN_ROUTE = $data['admin_dir']; |
| 790 | 790 | $TEMPLATE_CODE = 'default'; |
| 791 | 791 | $USER_DATA_ROUTE = 'user_data'; |
| 792 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
| 792 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
| 793 | 793 | $ROOT_URLPATH = $request->getBasePath(); |
| 794 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
| 794 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
| 795 | 795 | |
| 796 | 796 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
| 797 | 797 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | $content = str_replace( |
| 801 | 801 | $target, |
| 802 | 802 | $replace, |
| 803 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
| 803 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
| 804 | 804 | ); |
| 805 | 805 | $fs->dumpFile($config_file, $content); |
| 806 | 806 | |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | |
| 810 | 810 | private function sendAppData($params) |
| 811 | 811 | { |
| 812 | - $config_file = $this->config_path . '/database.yml'; |
|
| 812 | + $config_file = $this->config_path.'/database.yml'; |
|
| 813 | 813 | $db_config = Yaml::parse(file_get_contents($config_file)); |
| 814 | 814 | |
| 815 | 815 | $this->setPDO(); |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | } |
| 822 | 822 | |
| 823 | 823 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
| 824 | - $db_ver = 'MySQL:' . $version; |
|
| 824 | + $db_ver = 'MySQL:'.$version; |
|
| 825 | 825 | } else { |
| 826 | 826 | $db_ver = $version; |
| 827 | 827 | } |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | |
| 840 | 840 | $header = array( |
| 841 | 841 | 'Content-Type: application/x-www-form-urlencoded', |
| 842 | - 'Content-Length: ' . strlen($data), |
|
| 842 | + 'Content-Length: '.strlen($data), |
|
| 843 | 843 | ); |
| 844 | 844 | $context = stream_context_create( |
| 845 | 845 | array( |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | public function migration(InstallApplication $app, Request $request) |
| 868 | 868 | { |
| 869 | 869 | return $app['twig']->render('migration.twig', array( |
| 870 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 870 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 871 | 871 | )); |
| 872 | 872 | } |
| 873 | 873 | |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | return $app['twig']->render('migration_plugin.twig', array( |
| 897 | 897 | 'Plugins' => $Plugins, |
| 898 | 898 | 'version' => Constant::VERSION, |
| 899 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 899 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 900 | 900 | )); |
| 901 | 901 | } |
| 902 | 902 | } |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | \Eccube\Util\Cache::clear($config_app, true); |
| 920 | 920 | |
| 921 | 921 | return $app['twig']->render('migration_end.twig', array( |
| 922 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 922 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 923 | 923 | )); |
| 924 | 924 | } |
| 925 | 925 | } |
@@ -65,12 +65,12 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | // install.phpのチェック. |
| 67 | 67 | if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) { |
| 68 | - $file = $app['config']['root_dir'] . '/html/install.php'; |
|
| 68 | + $file = $app['config']['root_dir'].'/html/install.php'; |
|
| 69 | 69 | if (file_exists($file)) { |
| 70 | 70 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'html/install.php')); |
| 71 | 71 | $app->addWarning($message, 'admin'); |
| 72 | 72 | } |
| 73 | - $fileOnRoot = $app['config']['root_dir'] . '/install.php'; |
|
| 73 | + $fileOnRoot = $app['config']['root_dir'].'/install.php'; |
|
| 74 | 74 | if (file_exists($fileOnRoot)) { |
| 75 | 75 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'install.php')); |
| 76 | 76 | $app->addWarning($message, 'admin'); |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | t1.status |
| 312 | 312 | ORDER BY |
| 313 | 313 | t1.status'; |
| 314 | - $rsm = new ResultSetMapping();; |
|
| 314 | + $rsm = new ResultSetMapping(); ; |
|
| 315 | 315 | $rsm->addScalarResult('status', 'status'); |
| 316 | 316 | $rsm->addScalarResult('count', 'count'); |
| 317 | 317 | $query = $em->createNativeQuery($sql, $rsm); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | ))); |
| 111 | 111 | |
| 112 | 112 | $app = $this->app; |
| 113 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
| 113 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
| 114 | 114 | // モーダルからのPOST時に、金額等をセットする. |
| 115 | 115 | if ('modal' === $app['request']->get('modal')) { |
| 116 | 116 | $data = $event->getData(); |
@@ -127,17 +127,13 @@ discard block |
||
| 127 | 127 | $data['product_name'] = $Product->getName(); |
| 128 | 128 | $data['product_code'] = $ProductClass->getCode(); |
| 129 | 129 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
| 130 | - $ProductClass->getClassCategory1()->getClassName() : |
|
| 131 | - null; |
|
| 130 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
| 132 | 131 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
| 133 | - $ProductClass->getClassCategory2()->getClassName() : |
|
| 134 | - null; |
|
| 132 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
| 135 | 133 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
| 136 | - $ProductClass->getClassCategory1()->getName() : |
|
| 137 | - null; |
|
| 134 | + $ProductClass->getClassCategory1()->getName() : null; |
|
| 138 | 135 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
| 139 | - $ProductClass->getClassCategory2()->getName() : |
|
| 140 | - null; |
|
| 136 | + $ProductClass->getClassCategory2()->getName() : null; |
|
| 141 | 137 | $data['tax_rule'] = $TaxRule->getCalcRule()->getId(); |
| 142 | 138 | $data['price'] = $ProductClass->getPrice02(); |
| 143 | 139 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | ))); |
| 111 | 111 | |
| 112 | 112 | $app = $this->app; |
| 113 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
| 113 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
| 114 | 114 | // モーダルからのPOST時に、金額等をセットする. |
| 115 | 115 | if ('modal' === $app['request']->get('modal')) { |
| 116 | 116 | $data = $event->getData(); |
@@ -127,17 +127,13 @@ discard block |
||
| 127 | 127 | $data['product_name'] = $Product->getName(); |
| 128 | 128 | $data['product_code'] = $ProductClass->getCode(); |
| 129 | 129 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
| 130 | - $ProductClass->getClassCategory1()->getClassName() : |
|
| 131 | - null; |
|
| 130 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
| 132 | 131 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
| 133 | - $ProductClass->getClassCategory2()->getClassName() : |
|
| 134 | - null; |
|
| 132 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
| 135 | 133 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
| 136 | - $ProductClass->getClassCategory1()->getName() : |
|
| 137 | - null; |
|
| 134 | + $ProductClass->getClassCategory1()->getName() : null; |
|
| 138 | 135 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
| 139 | - $ProductClass->getClassCategory2()->getName() : |
|
| 140 | - null; |
|
| 136 | + $ProductClass->getClassCategory2()->getName() : null; |
|
| 141 | 137 | $data['tax_rule'] = $TaxRule->getCalcRule()->getId(); |
| 142 | 138 | $data['price'] = $ProductClass->getPrice02(); |
| 143 | 139 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $entityName = str_replace('-', '\\', $data['masterdata_name']); |
| 129 | 129 | $entity = new $entityName(); |
| 130 | 130 | $rank = 0; |
| 131 | - $ids = array_map(function ($v) {return $v['id'];}, $data['data']); |
|
| 131 | + $ids = array_map(function($v) {return $v['id']; }, $data['data']); |
|
| 132 | 132 | foreach ($data['data'] as $key => $value) { |
| 133 | 133 | if ($value['id'] !== null && $value['name'] !== null) { |
| 134 | 134 | $entity->setId($value['id']); |
@@ -117,9 +117,9 @@ discard block |
||
| 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( |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | if ($count > 1) { |
| 363 | 363 | $incrementedHeaders[] = $header; |
| 364 | 364 | for ($i = 1; $i < $count; $i++) { |
| 365 | - $incrementedHeaders[] = $header . $i; |
|
| 365 | + $incrementedHeaders[] = $header.$i; |
|
| 366 | 366 | } |
| 367 | 367 | } else { |
| 368 | 368 | $incrementedHeaders[] = $header; |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | protected function convertEncodingRows($row) { |
| 414 | 414 | if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) { |
| 415 | 415 | foreach ($row as &$col) { |
| 416 | - $col = mb_convert_encoding($col , 'UTF-8', 'SJIS-win'); |
|
| 416 | + $col = mb_convert_encoding($col, 'UTF-8', 'SJIS-win'); |
|
| 417 | 417 | } |
| 418 | 418 | } |
| 419 | 419 | return $row; |