@@ -792,6 +792,7 @@ |
||
| 792 | 792 | * ProductCategory作成 |
| 793 | 793 | * @param \Eccube\Entity\Product $Product |
| 794 | 794 | * @param \Eccube\Entity\Category $Category |
| 795 | + * @param integer $count |
|
| 795 | 796 | * @return \Eccube\Entity\ProductCategory |
| 796 | 797 | */ |
| 797 | 798 | private function createProductCategory($Product, $Category, $count) |
@@ -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)); |
@@ -1155,11 +1155,11 @@ |
||
| 1155 | 1155 | } |
| 1156 | 1156 | |
| 1157 | 1157 | /** |
| 1158 | - * ProductCategory作成 |
|
| 1159 | - * @param \Eccube\Entity\Product $Product |
|
| 1160 | - * @param \Eccube\Entity\Category $Category |
|
| 1161 | - * @return ProductCategory |
|
| 1162 | - */ |
|
| 1158 | + * ProductCategory作成 |
|
| 1159 | + * @param \Eccube\Entity\Product $Product |
|
| 1160 | + * @param \Eccube\Entity\Category $Category |
|
| 1161 | + * @return ProductCategory |
|
| 1162 | + */ |
|
| 1163 | 1163 | private function makeProductCategory($Product, $Category, $rank) |
| 1164 | 1164 | { |
| 1165 | 1165 | $ProductCategory = new ProductCategory(); |
@@ -679,6 +679,8 @@ discard block |
||
| 679 | 679 | /** |
| 680 | 680 | * 登録、更新時のエラー画面表示 |
| 681 | 681 | * |
| 682 | + * @param Application $app |
|
| 683 | + * @param \Symfony\Component\Form\FormInterface $form |
|
| 682 | 684 | */ |
| 683 | 685 | protected function render($app, $form, $headers) |
| 684 | 686 | { |
@@ -710,6 +712,7 @@ discard block |
||
| 710 | 712 | * アップロードされたCSVファイルの行ごとの処理 |
| 711 | 713 | * |
| 712 | 714 | * @param $formFile |
| 715 | + * @param Application $app |
|
| 713 | 716 | * @return CsvImportService |
| 714 | 717 | */ |
| 715 | 718 | protected function getImportData($app, $formFile) |
@@ -787,6 +790,8 @@ discard block |
||
| 787 | 790 | |
| 788 | 791 | /** |
| 789 | 792 | * 商品カテゴリの削除、登録 |
| 793 | + * @param Application $app |
|
| 794 | + * @param CsvImportService $data |
|
| 790 | 795 | */ |
| 791 | 796 | protected function createProductCategory($row, Product $Product, $app, $data) |
| 792 | 797 | { |
@@ -886,6 +891,8 @@ discard block |
||
| 886 | 891 | |
| 887 | 892 | /** |
| 888 | 893 | * 商品規格分類1、商品規格分類2がnullとなる商品規格情報を作成 |
| 894 | + * @param Application $app |
|
| 895 | + * @param CsvImportService $data |
|
| 889 | 896 | */ |
| 890 | 897 | protected function createProductClass($row, Product $Product, $app, $data, $ClassCategory1 = null, $ClassCategory2 = null) |
| 891 | 898 | { |
@@ -1027,6 +1034,8 @@ discard block |
||
| 1027 | 1034 | |
| 1028 | 1035 | /** |
| 1029 | 1036 | * 商品規格情報を更新 |
| 1037 | + * @param Application $app |
|
| 1038 | + * @param CsvImportService $data |
|
| 1030 | 1039 | */ |
| 1031 | 1040 | protected function updateProductClass($row, Product $Product, ProductClass $ProductClass, $app, $data) |
| 1032 | 1041 | { |
@@ -1173,6 +1182,7 @@ discard block |
||
| 1173 | 1182 | /** |
| 1174 | 1183 | * 登録、更新時のエラー画面表示 |
| 1175 | 1184 | * |
| 1185 | + * @param string $message |
|
| 1176 | 1186 | */ |
| 1177 | 1187 | protected function addErrors($message) |
| 1178 | 1188 | { |
@@ -1247,6 +1257,7 @@ discard block |
||
| 1247 | 1257 | * ProductCategory作成 |
| 1248 | 1258 | * @param \Eccube\Entity\Product $Product |
| 1249 | 1259 | * @param \Eccube\Entity\Category $Category |
| 1260 | + * @param integer $rank |
|
| 1250 | 1261 | * @return ProductCategory |
| 1251 | 1262 | */ |
| 1252 | 1263 | private function makeProductCategory($Product, $Category, $rank) |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | foreach ($data as $row) { |
| 193 | 193 | |
| 194 | 194 | if ($headerSize != count($row)) { |
| 195 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
| 195 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
| 196 | 196 | return $this->render($app, $form, $headers); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -203,33 +203,33 @@ discard block |
||
| 203 | 203 | if (preg_match('/^\d+$/', $row['商品ID'])) { |
| 204 | 204 | $Product = $this->productRepository->find($row['商品ID']); |
| 205 | 205 | if (!$Product) { |
| 206 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
| 206 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
| 207 | 207 | return $this->render($app, $form, $headers); |
| 208 | 208 | } |
| 209 | 209 | } else { |
| 210 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
| 210 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
| 211 | 211 | return $this->render($app, $form, $headers); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | if ($row['公開ステータス(ID)'] == '') { |
| 217 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。'); |
|
| 217 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。'); |
|
| 218 | 218 | } else { |
| 219 | 219 | if (preg_match('/^\d+$/', $row['公開ステータス(ID)'])) { |
| 220 | 220 | $Disp = $this->dispRepository->find($row['公開ステータス(ID)']); |
| 221 | 221 | if (!$Disp) { |
| 222 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
| 222 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
| 223 | 223 | } else { |
| 224 | 224 | $Product->setStatus($Disp); |
| 225 | 225 | } |
| 226 | 226 | } else { |
| 227 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
| 227 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
| 228 | 228 | } |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | if (Str::isBlank($row['商品名'])) { |
| 232 | - $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。'); |
|
| 232 | + $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。'); |
|
| 233 | 233 | return $this->render($app, $form, $headers); |
| 234 | 234 | } else { |
| 235 | 235 | $Product->setName(Str::trimAll($row['商品名'])); |
@@ -268,10 +268,10 @@ discard block |
||
| 268 | 268 | if ($row['商品削除フラグ'] == '') { |
| 269 | 269 | $Product->setDelFlg(Constant::DISABLED); |
| 270 | 270 | } else { |
| 271 | - if ($row['商品削除フラグ'] == (string)Constant::DISABLED || $row['商品削除フラグ'] == (string)Constant::ENABLED) { |
|
| 271 | + if ($row['商品削除フラグ'] == (string) Constant::DISABLED || $row['商品削除フラグ'] == (string) Constant::ENABLED) { |
|
| 272 | 272 | $Product->setDelFlg($row['商品削除フラグ']); |
| 273 | 273 | } else { |
| 274 | - $this->addErrors(($data->key() + 1) . '行目の商品削除フラグが設定されていません。'); |
|
| 274 | + $this->addErrors(($data->key() + 1).'行目の商品削除フラグが設定されていません。'); |
|
| 275 | 275 | return $this->render($app, $form, $headers); |
| 276 | 276 | } |
| 277 | 277 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
| 299 | 299 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
| 300 | 300 | } else { |
| 301 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
| 301 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
| 302 | 302 | } |
| 303 | 303 | } |
| 304 | 304 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | if ($row['規格分類1(ID)'] != '') { |
| 307 | 307 | |
| 308 | 308 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
| 309 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
| 309 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
| 310 | 310 | } else { |
| 311 | 311 | // 商品規格あり |
| 312 | 312 | // 企画分類あり商品を作成 |
@@ -321,30 +321,30 @@ discard block |
||
| 321 | 321 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
| 322 | 322 | $ClassCategory1 = $this->classCategoryRepository->find($row['規格分類1(ID)']); |
| 323 | 323 | if (!$ClassCategory1) { |
| 324 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 324 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 325 | 325 | } else { |
| 326 | 326 | $ProductClass->setClassCategory1($ClassCategory1); |
| 327 | 327 | } |
| 328 | 328 | } else { |
| 329 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 329 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | if ($row['規格分類2(ID)'] != '') { |
| 333 | 333 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
| 334 | 334 | $ClassCategory2 = $this->classCategoryRepository->find($row['規格分類2(ID)']); |
| 335 | 335 | if (!$ClassCategory2) { |
| 336 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 336 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 337 | 337 | } else { |
| 338 | 338 | if ($ClassCategory1 && |
| 339 | 339 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
| 340 | 340 | ) { |
| 341 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
| 341 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
| 342 | 342 | } else { |
| 343 | 343 | $ProductClass->setClassCategory2($ClassCategory2); |
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | } else { |
| 347 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 347 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 348 | 348 | } |
| 349 | 349 | } |
| 350 | 350 | $ProductClass->setProductStock($ProductStock); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | |
| 357 | 357 | } else { |
| 358 | 358 | if ($row['規格分類2(ID)'] != '') { |
| 359 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 359 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 360 | 360 | } |
| 361 | 361 | } |
| 362 | 362 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
| 385 | 385 | $pc->setDeliveryFee($deliveryFee); |
| 386 | 386 | } else { |
| 387 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
| 387 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
| 388 | 388 | } |
| 389 | 389 | } |
| 390 | 390 | } |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
| 409 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
| 409 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
| 410 | 410 | } else { |
| 411 | 411 | |
| 412 | 412 | // 必ず規格分類1がセットされている |
@@ -415,36 +415,36 @@ discard block |
||
| 415 | 415 | if (preg_match('/^\d+$/', $classCategoryId1)) { |
| 416 | 416 | $ClassCategory1 = $this->classCategoryRepository->find($classCategoryId1); |
| 417 | 417 | if (!$ClassCategory1) { |
| 418 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 418 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 419 | 419 | } |
| 420 | 420 | } else { |
| 421 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 421 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | $ClassCategory2 = null; |
| 425 | 425 | if ($row['規格分類2(ID)'] != '') { |
| 426 | 426 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
| 427 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
| 427 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
| 428 | 428 | } else { |
| 429 | 429 | if (preg_match('/^\d+$/', $classCategoryId2)) { |
| 430 | 430 | $ClassCategory2 = $this->classCategoryRepository->find($classCategoryId2); |
| 431 | 431 | if (!$ClassCategory2) { |
| 432 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 432 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 433 | 433 | } else { |
| 434 | 434 | if ($ClassCategory1 && |
| 435 | 435 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
| 436 | 436 | ) { |
| 437 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
| 437 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
| 438 | 438 | } |
| 439 | 439 | } |
| 440 | 440 | } else { |
| 441 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 441 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | } |
| 445 | 445 | } else { |
| 446 | 446 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
| 447 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
| 447 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
| 448 | 448 | } |
| 449 | 449 | } |
| 450 | 450 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
| 456 | 456 | $ProductClass->setDeliveryFee($deliveryFee); |
| 457 | 457 | } else { |
| 458 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
| 458 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
| 459 | 459 | } |
| 460 | 460 | } |
| 461 | 461 | } |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | foreach ($data as $row) { |
| 546 | 546 | |
| 547 | 547 | if ($headerSize != count($row)) { |
| 548 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
| 548 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
| 549 | 549 | return $this->render($app, $form, $headers); |
| 550 | 550 | } |
| 551 | 551 | |
@@ -553,23 +553,23 @@ discard block |
||
| 553 | 553 | $Category = new Category(); |
| 554 | 554 | } else { |
| 555 | 555 | if (!preg_match('/^\d+$/', $row['カテゴリID'])) { |
| 556 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
| 556 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
| 557 | 557 | return $this->render($app, $form, $headers); |
| 558 | 558 | } |
| 559 | 559 | $Category = $this->categoryRepository->find($row['カテゴリID']); |
| 560 | 560 | if (!$Category) { |
| 561 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
| 561 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
| 562 | 562 | return $this->render($app, $form, $headers); |
| 563 | 563 | } |
| 564 | 564 | if ($row['カテゴリID'] == $row['親カテゴリID']) { |
| 565 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
| 565 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
| 566 | 566 | return $this->render($app, $form, $headers); |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | if (Str::isBlank($row['カテゴリ名'])) { |
| 572 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。'); |
|
| 572 | + $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。'); |
|
| 573 | 573 | return $this->render($app, $form, $headers); |
| 574 | 574 | } else { |
| 575 | 575 | $Category->setName(Str::trimAll($row['カテゴリ名'])); |
@@ -578,13 +578,13 @@ discard block |
||
| 578 | 578 | if ($row['親カテゴリID'] != '') { |
| 579 | 579 | |
| 580 | 580 | if (!preg_match('/^\d+$/', $row['親カテゴリID'])) { |
| 581 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
| 581 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
| 582 | 582 | return $this->render($app, $form, $headers); |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | $ParentCategory = $this->categoryRepository->find($row['親カテゴリID']); |
| 586 | 586 | if (!$ParentCategory) { |
| 587 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
| 587 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
| 588 | 588 | return $this->render($app, $form, $headers); |
| 589 | 589 | } |
| 590 | 590 | |
@@ -600,14 +600,14 @@ discard block |
||
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | if ($this->appConfig['category_nest_level'] < $Category->getLevel()) { |
| 603 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
| 603 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
| 604 | 604 | return $this->render($app, $form, $headers); |
| 605 | 605 | } |
| 606 | 606 | |
| 607 | 607 | $status = $this->categoryRepository->save($Category); |
| 608 | 608 | |
| 609 | 609 | if (!$status) { |
| 610 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが設定できません。'); |
|
| 610 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが設定できません。'); |
|
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | if ($this->hasErrors()) { |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | throw new NotFoundHttpException(); |
| 655 | 655 | } |
| 656 | 656 | |
| 657 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
| 657 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
| 658 | 658 | |
| 659 | 659 | // ヘッダ行の出力 |
| 660 | 660 | $row = array(); |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | }); |
| 670 | 670 | |
| 671 | 671 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 672 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 672 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 673 | 673 | $response->send(); |
| 674 | 674 | |
| 675 | 675 | return $response; |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | if (!empty($this->fileName)) { |
| 693 | 693 | try { |
| 694 | 694 | $fs = new Filesystem(); |
| 695 | - $fs->remove($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName); |
|
| 695 | + $fs->remove($this->appConfig['csv_temp_realdir'].'/'.$this->fileName); |
|
| 696 | 696 | } catch (\Exception $e) { |
| 697 | 697 | // エラーが発生しても無視する |
| 698 | 698 | } |
@@ -715,10 +715,10 @@ discard block |
||
| 715 | 715 | protected function getImportData($app, $formFile) |
| 716 | 716 | { |
| 717 | 717 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
| 718 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
| 718 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
| 719 | 719 | $formFile->move($this->appConfig['csv_temp_realdir'], $this->fileName); |
| 720 | 720 | |
| 721 | - $file = file_get_contents($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName); |
|
| 721 | + $file = file_get_contents($this->appConfig['csv_temp_realdir'].'/'.$this->fileName); |
|
| 722 | 722 | |
| 723 | 723 | if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) { |
| 724 | 724 | // Windows 環境の PHP7 の場合はファイルエンコーディングを CP932 に合わせる |
@@ -814,8 +814,8 @@ discard block |
||
| 814 | 814 | if (!$Category) { |
| 815 | 815 | $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。'); |
| 816 | 816 | } else { |
| 817 | - foreach($Category->getPath() as $ParentCategory){ |
|
| 818 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
| 817 | + foreach ($Category->getPath() as $ParentCategory) { |
|
| 818 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
| 819 | 819 | $ProductCategory = $this->makeProductCategory($Product, $ParentCategory, $rank); |
| 820 | 820 | $this->entityManager->persist($ProductCategory); |
| 821 | 821 | $rank++; |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | $categoriesIdList[$ParentCategory->getId()] = true; |
| 824 | 824 | } |
| 825 | 825 | } |
| 826 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
| 826 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
| 827 | 827 | $ProductCategory = $this->makeProductCategory($Product, $Category, $rank); |
| 828 | 828 | $rank++; |
| 829 | 829 | $this->em->persist($ProductCategory); |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | } |
| 879 | 879 | } |
| 880 | 880 | if (!$Tag) { |
| 881 | - $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。'); |
|
| 881 | + $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。'); |
|
| 882 | 882 | } |
| 883 | 883 | } |
| 884 | 884 | } |
@@ -896,17 +896,17 @@ discard block |
||
| 896 | 896 | |
| 897 | 897 | |
| 898 | 898 | if ($row['商品種別(ID)'] == '') { |
| 899 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
| 899 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
| 900 | 900 | } else { |
| 901 | 901 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
| 902 | 902 | $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']); |
| 903 | 903 | if (!$ProductType) { |
| 904 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
| 904 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
| 905 | 905 | } else { |
| 906 | 906 | $ProductClass->setProductType($ProductType); |
| 907 | 907 | } |
| 908 | 908 | } else { |
| 909 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
| 909 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
| 910 | 910 | } |
| 911 | 911 | } |
| 912 | 912 | |
@@ -917,12 +917,12 @@ discard block |
||
| 917 | 917 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
| 918 | 918 | $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']); |
| 919 | 919 | if (!$DeliveryDate) { |
| 920 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
| 920 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
| 921 | 921 | } else { |
| 922 | 922 | $ProductClass->setDeliveryDate($DeliveryDate); |
| 923 | 923 | } |
| 924 | 924 | } else { |
| 925 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
| 925 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
| 926 | 926 | } |
| 927 | 927 | } |
| 928 | 928 | |
@@ -933,19 +933,19 @@ discard block |
||
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | if ($row['在庫数無制限フラグ'] == '') { |
| 936 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
| 936 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
| 937 | 937 | } else { |
| 938 | 938 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
| 939 | 939 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
| 940 | 940 | // 在庫数が設定されていなければエラー |
| 941 | 941 | if ($row['在庫数'] == '') { |
| 942 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
| 942 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
| 943 | 943 | } else { |
| 944 | 944 | $stock = str_replace(',', '', $row['在庫数']); |
| 945 | 945 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
| 946 | 946 | $ProductClass->setStock($stock); |
| 947 | 947 | } else { |
| 948 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
| 948 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
| 949 | 949 | } |
| 950 | 950 | } |
| 951 | 951 | |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
| 954 | 954 | $ProductClass->setStock(null); |
| 955 | 955 | } else { |
| 956 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
| 956 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
| 957 | 957 | } |
| 958 | 958 | } |
| 959 | 959 | |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
| 963 | 963 | $ProductClass->setSaleLimit($saleLimit); |
| 964 | 964 | } else { |
| 965 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
| 965 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
| 966 | 966 | } |
| 967 | 967 | } |
| 968 | 968 | |
@@ -971,18 +971,18 @@ discard block |
||
| 971 | 971 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
| 972 | 972 | $ProductClass->setPrice01($price01); |
| 973 | 973 | } else { |
| 974 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
| 974 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
| 975 | 975 | } |
| 976 | 976 | } |
| 977 | 977 | |
| 978 | 978 | if ($row['販売価格'] == '') { |
| 979 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
| 979 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
| 980 | 980 | } else { |
| 981 | 981 | $price02 = str_replace(',', '', $row['販売価格']); |
| 982 | 982 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
| 983 | 983 | $ProductClass->setPrice02($price02); |
| 984 | 984 | } else { |
| 985 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
| 985 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
| 986 | 986 | } |
| 987 | 987 | } |
| 988 | 988 | |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | if (preg_match('/^\d+$/', $delivery_fee) && $delivery_fee >= 0) { |
| 992 | 992 | $ProductClass->setDeliveryFee($delivery_fee); |
| 993 | 993 | } else { |
| 994 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
| 994 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
| 995 | 995 | } |
| 996 | 996 | } |
| 997 | 997 | |
@@ -1001,7 +1001,7 @@ discard block |
||
| 1001 | 1001 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
| 1002 | 1002 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
| 1003 | 1003 | } else { |
| 1004 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
| 1004 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
| 1005 | 1005 | } |
| 1006 | 1006 | } |
| 1007 | 1007 | |
@@ -1034,17 +1034,17 @@ discard block |
||
| 1034 | 1034 | $ProductClass->setProduct($Product); |
| 1035 | 1035 | |
| 1036 | 1036 | if ($row['商品種別(ID)'] == '') { |
| 1037 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
| 1037 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
| 1038 | 1038 | } else { |
| 1039 | 1039 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
| 1040 | 1040 | $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']); |
| 1041 | 1041 | if (!$ProductType) { |
| 1042 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
| 1042 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
| 1043 | 1043 | } else { |
| 1044 | 1044 | $ProductClass->setProductType($ProductType); |
| 1045 | 1045 | } |
| 1046 | 1046 | } else { |
| 1047 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
| 1047 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
| 1048 | 1048 | } |
| 1049 | 1049 | } |
| 1050 | 1050 | |
@@ -1053,12 +1053,12 @@ discard block |
||
| 1053 | 1053 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
| 1054 | 1054 | $ClassCategory = $this->classCategoryRepository->find($row['規格分類1(ID)']); |
| 1055 | 1055 | if (!$ClassCategory) { |
| 1056 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 1056 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 1057 | 1057 | } else { |
| 1058 | 1058 | $ProductClass->setClassCategory1($ClassCategory); |
| 1059 | 1059 | } |
| 1060 | 1060 | } else { |
| 1061 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
| 1061 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
| 1062 | 1062 | } |
| 1063 | 1063 | } |
| 1064 | 1064 | |
@@ -1066,12 +1066,12 @@ discard block |
||
| 1066 | 1066 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
| 1067 | 1067 | $ClassCategory = $this->classCategoryRepository->find($row['規格分類2(ID)']); |
| 1068 | 1068 | if (!$ClassCategory) { |
| 1069 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 1069 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 1070 | 1070 | } else { |
| 1071 | 1071 | $ProductClass->setClassCategory2($ClassCategory); |
| 1072 | 1072 | } |
| 1073 | 1073 | } else { |
| 1074 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
| 1074 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
| 1075 | 1075 | } |
| 1076 | 1076 | } |
| 1077 | 1077 | |
@@ -1079,12 +1079,12 @@ discard block |
||
| 1079 | 1079 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
| 1080 | 1080 | $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']); |
| 1081 | 1081 | if (!$DeliveryDate) { |
| 1082 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
| 1082 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
| 1083 | 1083 | } else { |
| 1084 | 1084 | $ProductClass->setDeliveryDate($DeliveryDate); |
| 1085 | 1085 | } |
| 1086 | 1086 | } else { |
| 1087 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
| 1087 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
| 1088 | 1088 | } |
| 1089 | 1089 | } |
| 1090 | 1090 | |
@@ -1095,19 +1095,19 @@ discard block |
||
| 1095 | 1095 | } |
| 1096 | 1096 | |
| 1097 | 1097 | if ($row['在庫数無制限フラグ'] == '') { |
| 1098 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
| 1098 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
| 1099 | 1099 | } else { |
| 1100 | 1100 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
| 1101 | 1101 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
| 1102 | 1102 | // 在庫数が設定されていなければエラー |
| 1103 | 1103 | if ($row['在庫数'] == '') { |
| 1104 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
| 1104 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
| 1105 | 1105 | } else { |
| 1106 | 1106 | $stock = str_replace(',', '', $row['在庫数']); |
| 1107 | 1107 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
| 1108 | 1108 | $ProductClass->setStock($row['在庫数']); |
| 1109 | 1109 | } else { |
| 1110 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
| 1110 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
| 1111 | 1111 | } |
| 1112 | 1112 | } |
| 1113 | 1113 | |
@@ -1115,7 +1115,7 @@ discard block |
||
| 1115 | 1115 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
| 1116 | 1116 | $ProductClass->setStock(null); |
| 1117 | 1117 | } else { |
| 1118 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
| 1118 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
| 1119 | 1119 | } |
| 1120 | 1120 | } |
| 1121 | 1121 | |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
| 1125 | 1125 | $ProductClass->setSaleLimit($saleLimit); |
| 1126 | 1126 | } else { |
| 1127 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
| 1127 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
| 1128 | 1128 | } |
| 1129 | 1129 | } |
| 1130 | 1130 | |
@@ -1133,18 +1133,18 @@ discard block |
||
| 1133 | 1133 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
| 1134 | 1134 | $ProductClass->setPrice01($price01); |
| 1135 | 1135 | } else { |
| 1136 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
| 1136 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
| 1137 | 1137 | } |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | 1140 | if ($row['販売価格'] == '') { |
| 1141 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
| 1141 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
| 1142 | 1142 | } else { |
| 1143 | 1143 | $price02 = str_replace(',', '', $row['販売価格']); |
| 1144 | 1144 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
| 1145 | 1145 | $ProductClass->setPrice02($price02); |
| 1146 | 1146 | } else { |
| 1147 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
| 1147 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
| 1148 | 1148 | } |
| 1149 | 1149 | } |
| 1150 | 1150 | |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
| 1155 | 1155 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
| 1156 | 1156 | } else { |
| 1157 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
| 1157 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
| 1158 | 1158 | } |
| 1159 | 1159 | } |
| 1160 | 1160 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | if (is_writable($logDir)) { |
| 41 | 41 | if (file_exists($installLog) && !is_writable($installLog)) { |
| 42 | - die($installLog . ' の書込権限を変更して下さい。'); |
|
| 42 | + die($installLog.' の書込権限を変更して下さい。'); |
|
| 43 | 43 | } |
| 44 | 44 | // install step2 でログディレクトリに書き込み権限が付与されればログ出力を開始する. |
| 45 | 45 | $app->register(new \Silex\Provider\MonologServiceProvider(), array( |
@@ -153,9 +153,9 @@ discard block |
||
| 153 | 153 | $qb |
| 154 | 154 | ->andWhere('c.id = :customer_id OR CONCAT(c.name01, c.name02) LIKE :name OR CONCAT(c.kana01, c.kana02) LIKE :kana OR c.email LIKE :email') |
| 155 | 155 | ->setParameter('customer_id', $id) |
| 156 | - ->setParameter('name', '%' . $clean_key_multi . '%') |
|
| 157 | - ->setParameter('kana', '%' . $clean_key_multi . '%') |
|
| 158 | - ->setParameter('email', '%' . $clean_key_multi . '%'); |
|
| 156 | + ->setParameter('name', '%'.$clean_key_multi.'%') |
|
| 157 | + ->setParameter('kana', '%'.$clean_key_multi.'%') |
|
| 158 | + ->setParameter('email', '%'.$clean_key_multi.'%'); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | // Pref |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
| 206 | 206 | $qb |
| 207 | 207 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
| 208 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 208 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | // buy_total |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | ->leftJoin('c.Orders', 'o') |
| 300 | 300 | ->leftJoin('o.OrderDetails', 'od') |
| 301 | 301 | ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name') |
| 302 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%'); |
|
| 302 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_code'].'%'); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | // Order By |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | /** |
| 324 | 324 | * ユニークなシークレットキーを返す |
| 325 | - * @param $app |
|
| 325 | + * @param \Eccube\Application $app |
|
| 326 | 326 | * @return string |
| 327 | 327 | */ |
| 328 | 328 | public function getUniqueSecretKey($app) |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | /** |
| 342 | 342 | * ユニークなパスワードリセットキーを返す |
| 343 | - * @param $app |
|
| 343 | + * @param \Eccube\Application $app |
|
| 344 | 344 | * @return string |
| 345 | 345 | */ |
| 346 | 346 | public function getUniqueResetKey($app) |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | /** |
| 360 | 360 | * saltを生成する |
| 361 | 361 | * |
| 362 | - * @param $byte |
|
| 362 | + * @param integer $byte |
|
| 363 | 363 | * @return string |
| 364 | 364 | */ |
| 365 | 365 | public function createSalt($byte) |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | /** |
| 371 | 371 | * 入力されたパスワードをSaltと暗号化する |
| 372 | 372 | * |
| 373 | - * @param $app |
|
| 373 | + * @param \Eccube\Application $app |
|
| 374 | 374 | * @param Customer $Customer |
| 375 | 375 | * @return mixed |
| 376 | 376 | */ |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | /** |
| 431 | 431 | * 会員の初回購入時間、購入時間、購入回数、購入金額を更新する |
| 432 | 432 | * |
| 433 | - * @param $app |
|
| 433 | + * @param \Eccube\Application $app |
|
| 434 | 434 | * @param Customer $Customer |
| 435 | 435 | * @param $orderStatusId |
| 436 | 436 | */ |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | $cmf->setEntityManager($em); |
| 165 | 165 | $metadatas = $cmf->getAllMetadata(); |
| 166 | 166 | |
| 167 | - $filters = array_map(function ($value) { |
|
| 167 | + $filters = array_map(function($value) { |
|
| 168 | 168 | return ucfirst(Inflector::camelize(str_replace('plg_', '', $value))); |
| 169 | 169 | }, $tableList); |
| 170 | 170 | $metadatas = MetadataFilter::filter($metadatas, $filters); |
@@ -964,7 +964,7 @@ |
||
| 964 | 964 | * 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() |
| 965 | 965 | * 備考 : app['debug']がtrueの際は処理を行わない |
| 966 | 966 | * |
| 967 | - * @return boolean true |
|
| 967 | + * @return null|boolean true |
|
| 968 | 968 | * |
| 969 | 969 | */ |
| 970 | 970 | protected function checkDatabaseConnection() |
@@ -543,13 +543,13 @@ |
||
| 543 | 543 | $pluginConfigs = PluginConfigManager::getPluginConfigAll($this['debug']); |
| 544 | 544 | $ormMappings = array(); |
| 545 | 545 | $ormMappings[] = array( |
| 546 | - 'type' => 'annotation', |
|
| 547 | - 'namespace' => 'Eccube\Entity', |
|
| 548 | - 'path' => array( |
|
| 549 | - __DIR__.'/Entity' |
|
| 550 | - ), |
|
| 551 | - 'use_simple_annotation_reader' => false, |
|
| 552 | - ); |
|
| 546 | + 'type' => 'annotation', |
|
| 547 | + 'namespace' => 'Eccube\Entity', |
|
| 548 | + 'path' => array( |
|
| 549 | + __DIR__.'/Entity' |
|
| 550 | + ), |
|
| 551 | + 'use_simple_annotation_reader' => false, |
|
| 552 | + ); |
|
| 553 | 553 | |
| 554 | 554 | // TODO namespace は暫定 |
| 555 | 555 | $ormMappings[] = array( |
@@ -23,9 +23,6 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace Eccube; |
| 25 | 25 | |
| 26 | -use Doctrine\Common\Annotations\AnnotationReader; |
|
| 27 | -use Doctrine\Common\Annotations\CachedReader; |
|
| 28 | -use Doctrine\Common\Cache\ArrayCache; |
|
| 29 | 26 | use Doctrine\DBAL\Types\Type; |
| 30 | 27 | use Eccube\Doctrine\DBAL\Types\UTCDateTimeType; |
| 31 | 28 | use Eccube\Doctrine\DBAL\Types\UTCDateTimeTzType; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $this->register(new \Saxulum\Validator\Provider\SaxulumValidatorProvider()); |
| 171 | 171 | $this->register(new MobileDetectServiceProvider()); |
| 172 | 172 | |
| 173 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
| 173 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
| 174 | 174 | if ($this['debug']) { |
| 175 | 175 | return; |
| 176 | 176 | } |
@@ -276,14 +276,14 @@ discard block |
||
| 276 | 276 | return $router; |
| 277 | 277 | }); |
| 278 | 278 | |
| 279 | - $this['eccube.router.origin'] = function ($app) { |
|
| 279 | + $this['eccube.router.origin'] = function($app) { |
|
| 280 | 280 | $resource = __DIR__.'/Controller'; |
| 281 | 281 | $cachePrefix = 'Origin'; |
| 282 | 282 | |
| 283 | 283 | return $app['eccube.router']($resource, $cachePrefix); |
| 284 | 284 | }; |
| 285 | 285 | |
| 286 | - $this['eccube.routers.plugin'] = function ($app) { |
|
| 286 | + $this['eccube.routers.plugin'] = function($app) { |
|
| 287 | 287 | // TODO 有効なプラグインを対象とする必要がある. |
| 288 | 288 | $dirs = Finder::create() |
| 289 | 289 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | return $routers; |
| 301 | 301 | }; |
| 302 | 302 | |
| 303 | - $this['eccube.router.extend'] = function ($app) { |
|
| 303 | + $this['eccube.router.extend'] = function($app) { |
|
| 304 | 304 | // TODO ディレクトリ名は暫定 |
| 305 | 305 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
| 306 | 306 | $cachePrefix = 'Extend'; |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | return $router; |
| 311 | 311 | }; |
| 312 | 312 | |
| 313 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
| 313 | + $this->extend('request_matcher', function($matcher, $app) { |
|
| 314 | 314 | $matchers = []; |
| 315 | 315 | $matchers[] = $app['eccube.router.extend']; |
| 316 | 316 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | return new ChainUrlMatcher($matchers, $app['request_context']); |
| 323 | 323 | }); |
| 324 | 324 | |
| 325 | - $this->extend('url_generator', function ($generator, $app) { |
|
| 325 | + $this->extend('url_generator', function($generator, $app) { |
|
| 326 | 326 | $generators = []; |
| 327 | 327 | $generators[] = $app['eccube.router.extend']; |
| 328 | 328 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | }); |
| 336 | 336 | |
| 337 | 337 | // Route CollectionにEC-CUBEで定義したルーティングを追加(debug tool barに出力するため) |
| 338 | - $this->extend('routes', function ($routes, $app) { |
|
| 338 | + $this->extend('routes', function($routes, $app) { |
|
| 339 | 339 | $routes->addCollection($app['eccube.router.extend']->getRouteCollection()); |
| 340 | 340 | foreach ($app['eccube.routers.plugin'] as $router) { |
| 341 | 341 | $routes->addCollection($router->getRouteCollection()); |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
| 369 | 369 | 'locale_fallbacks' => ['ja', 'en'], |
| 370 | 370 | )); |
| 371 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
| 371 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
| 372 | 372 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
| 373 | 373 | |
| 374 | 374 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -415,14 +415,14 @@ discard block |
||
| 415 | 415 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
| 416 | 416 | 'twig.form.templates' => array('Form/form_layout.twig'), |
| 417 | 417 | )); |
| 418 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
| 418 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
| 419 | 419 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
| 420 | 420 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
| 421 | 421 | |
| 422 | 422 | return $twig; |
| 423 | 423 | }); |
| 424 | 424 | |
| 425 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
| 425 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
| 426 | 426 | $app['admin'] = $app['front'] = false; |
| 427 | 427 | $pathinfo = rawurldecode($request->getPathInfo()); |
| 428 | 428 | if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) { |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | } |
| 439 | 439 | $paths[] = $app['config']['template_admin_realdir']; |
| 440 | 440 | $paths[] = __DIR__.'/../../app/Plugin'; |
| 441 | - $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
| 441 | + $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
| 442 | 442 | } else { |
| 443 | 443 | // モバイル端末時、smartphoneディレクトリを探索パスに追加する. |
| 444 | 444 | if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) { |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | } |
| 454 | 454 | $paths[] = $app['config']['template_default_realdir']; |
| 455 | 455 | $paths[] = __DIR__.'/../../app/Plugin'; |
| 456 | - $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
| 456 | + $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
| 457 | 457 | } |
| 458 | 458 | $app['twig']->setCache($app['debug'] ? null : $cacheDir); |
| 459 | 459 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | }, self::EARLY_EVENT); |
| 472 | 472 | |
| 473 | 473 | // twigのグローバル変数を定義. |
| 474 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 474 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 475 | 475 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
| 476 | 476 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
| 477 | 477 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
| 558 | 558 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
| 559 | 559 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
| 560 | - \Swift::init(function () { |
|
| 560 | + \Swift::init(function() { |
|
| 561 | 561 | \Swift_DependencyContainer::getInstance() |
| 562 | 562 | ->register('mime.qpheaderencoder') |
| 563 | 563 | ->asAliasOf('mime.base64headerencoder'); |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider()); |
| 593 | 593 | |
| 594 | 594 | $app = $this; |
| 595 | - $this->extend('db.event_manager', function ($evm) use ($app) { |
|
| 595 | + $this->extend('db.event_manager', function($evm) use ($app) { |
|
| 596 | 596 | $initSubscriber = new InitSubscriber($app); |
| 597 | 597 | $evm->addEventSubscriber($initSubscriber); |
| 598 | 598 | |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | $this->extend( |
| 689 | 689 | 'orm.em.config', |
| 690 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
| 690 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
| 691 | 691 | |
| 692 | 692 | /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */ |
| 693 | 693 | $chain = $config->getMetadataDriverImpl(); |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | } |
| 710 | 710 | ); |
| 711 | 711 | |
| 712 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 712 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 713 | 713 | // save |
| 714 | 714 | $saveEventSubscriber = new \Eccube\Doctrine\EventSubscriber\SaveEventSubscriber($app); |
| 715 | 715 | $em->getEventManager()->addEventSubscriber($saveEventSubscriber); |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | // second level cacheの設定. |
| 733 | 733 | $this->extend( |
| 734 | 734 | 'orm.em.config', |
| 735 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
| 735 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
| 736 | 736 | $config->setSecondLevelCacheEnabled(); |
| 737 | 737 | $cacheConfig = $config->getSecondLevelCacheConfiguration(); |
| 738 | 738 | $regionConfig = $cacheConfig->getRegionsConfiguration(); |
@@ -821,31 +821,31 @@ discard block |
||
| 821 | 821 | array('^/mypage', 'ROLE_USER', $channel), |
| 822 | 822 | ); |
| 823 | 823 | |
| 824 | - $this['eccube.password_encoder'] = function ($app) { |
|
| 824 | + $this['eccube.password_encoder'] = function($app) { |
|
| 825 | 825 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
| 826 | 826 | }; |
| 827 | - $this['security.encoder_factory'] = function ($app) { |
|
| 827 | + $this['security.encoder_factory'] = function($app) { |
|
| 828 | 828 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
| 829 | 829 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
| 830 | 830 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
| 831 | 831 | )); |
| 832 | 832 | }; |
| 833 | - $this['eccube.event_listner.security'] = function ($app) { |
|
| 833 | + $this['eccube.event_listner.security'] = function($app) { |
|
| 834 | 834 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
| 835 | 835 | }; |
| 836 | 836 | |
| 837 | 837 | // Voterの設定 |
| 838 | - $this['authority_voter'] = function ($app) { |
|
| 838 | + $this['authority_voter'] = function($app) { |
|
| 839 | 839 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
| 840 | 840 | }; |
| 841 | 841 | |
| 842 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
| 842 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
| 843 | 843 | $voters[] = $app['authority_voter']; |
| 844 | 844 | |
| 845 | 845 | return $voters; |
| 846 | 846 | }); |
| 847 | 847 | |
| 848 | - $this['security.access_manager'] = function ($app) { |
|
| 848 | + $this['security.access_manager'] = function($app) { |
|
| 849 | 849 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
| 850 | 850 | }; |
| 851 | 851 | |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | { |
| 860 | 860 | $config = $this['config']; |
| 861 | 861 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
| 862 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
| 862 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
| 863 | 863 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
| 864 | 864 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
| 865 | 865 | }, self::EARLY_EVENT); |
@@ -876,7 +876,7 @@ discard block |
||
| 876 | 876 | $this->register(new ServiceProvider\EccubePluginServiceProvider()); |
| 877 | 877 | |
| 878 | 878 | // TODO Acme\ServiceProvider の初期化はここで OK? |
| 879 | - if (array_key_exists('service',$this['config'])) { |
|
| 879 | + if (array_key_exists('service', $this['config'])) { |
|
| 880 | 880 | foreach ($this['config']['service'] as $service) { |
| 881 | 881 | $this->register(new $service); |
| 882 | 882 | } |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | $app = $this; |
| 1033 | 1033 | |
| 1034 | 1034 | // Response Event(http cache対応、event実行は一番遅く設定) |
| 1035 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 1035 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 1036 | 1036 | |
| 1037 | 1037 | if (!$event->isMasterRequest()) { |
| 1038 | 1038 | return; |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) { |
|
| 115 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) { |
|
| 116 | 116 | $data = $event->getData(); |
| 117 | 117 | $form = $event->getForm(); |
| 118 | 118 | if (!is_null($Product->getClassName2())) { |
@@ -26,7 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | use Eccube\Annotation\FormType; |
| 28 | 28 | use Eccube\Annotation\Inject; |
| 29 | -use Eccube\Application; |
|
| 30 | 29 | use Symfony\Component\Form\AbstractType; |
| 31 | 30 | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; |
| 32 | 31 | use Symfony\Component\Form\Extension\Core\Type\HiddenType; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | $this->app = $this->getSilexApplication(); |
| 54 | 54 | |
| 55 | - \Eccube\Util\Cache::clear($this->app,$input->getOption('all')); |
|
| 55 | + \Eccube\Util\Cache::clear($this->app, $input->getOption('all')); |
|
| 56 | 56 | $output->writeln(sprintf("%s <info>success</info>", 'cache:clear')); |
| 57 | 57 | |
| 58 | 58 | } |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | |
| 25 | 25 | namespace Eccube\Command; |
| 26 | 26 | |
| 27 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 28 | 27 | use Symfony\Component\Console\Input\InputInterface; |
| 29 | 28 | use Symfony\Component\Console\Input\InputOption; |
| 30 | 29 | use Symfony\Component\Console\Output\OutputInterface; |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $webProcessor = new WebProcessor(); |
| 112 | 112 | $uidProcessor = new UidProcessor(8); |
| 113 | 113 | |
| 114 | - $FingerCrossedHandler->pushProcessor(function ($record) use ($app, $uidProcessor, $webProcessor) { |
|
| 114 | + $FingerCrossedHandler->pushProcessor(function($record) use ($app, $uidProcessor, $webProcessor) { |
|
| 115 | 115 | // ログフォーマットに出力する値を独自に設定 |
| 116 | 116 | |
| 117 | 117 | $record['level_name'] = sprintf("%-5s", $record['level_name']); |