@@ -817,7 +817,7 @@ |
||
| 817 | 817 | if ($dispatcher instanceof Response |
| 818 | 818 | && ($dispatcher->isRedirection() || $dispatcher->getContent()) |
| 819 | 819 | ) { // $paymentMethod->apply() が Response を返した場合は画面遷移 |
| 820 | - return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
| 820 | + return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
| 821 | 821 | } |
| 822 | 822 | $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行 |
| 823 | 823 | if (!$PaymentResult->isSuccess()) { |
@@ -194,7 +194,7 @@ |
||
| 194 | 194 | ); |
| 195 | 195 | $addCartForm = $builder->getForm(); |
| 196 | 196 | |
| 197 | - if ($request->getMethod() === 'POST' && (string)$Product->getId() === $request->get('product_id')) { |
|
| 197 | + if ($request->getMethod() === 'POST' && (string) $Product->getId() === $request->get('product_id')) { |
|
| 198 | 198 | $addCartForm->handleRequest($request); |
| 199 | 199 | |
| 200 | 200 | if ($addCartForm->isValid()) { |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | } |
| 91 | 91 | if ($dir == 'doctrine') { |
| 92 | 92 | // doctrineが指定された場合は, cache driver経由で削除. |
| 93 | - $config = $this->entityManager->getConfiguration(); |
|
| 93 | + $config = $this->entityManager->getConfiguration(); |
|
| 94 | 94 | $this->deleteDoctrineCache($config->getMetadataCacheImpl()); |
| 95 | 95 | $this->deleteDoctrineCache($config->getQueryCacheImpl()); |
| 96 | 96 | $this->deleteDoctrineCache($config->getResultCacheImpl()); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | // ファイル生成・更新 |
| 175 | 175 | $tplDir = $this->appConfig['block_realdir']; |
| 176 | 176 | |
| 177 | - $filePath = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
| 177 | + $filePath = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
| 178 | 178 | |
| 179 | 179 | $fs = new Filesystem(); |
| 180 | 180 | $blockData = $form->get('block_html')->getData(); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $fs->dumpFile($filePath, $blockData); |
| 183 | 183 | // 更新でファイル名を変更した場合、以前のファイルを削除 |
| 184 | 184 | if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) { |
| 185 | - $oldFilePath = $tplDir . '/' . $previous_filename . '.twig'; |
|
| 185 | + $oldFilePath = $tplDir.'/'.$previous_filename.'.twig'; |
|
| 186 | 186 | if ($fs->exists($oldFilePath)) { |
| 187 | 187 | $fs->remove($oldFilePath); |
| 188 | 188 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る |
| 240 | 240 | if ($Block->getDeletableFlg() > 0) { |
| 241 | 241 | $tplDir = $this->appConfig['block_realdir']; |
| 242 | - $file = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
| 242 | + $file = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
| 243 | 243 | $fs = new Filesystem(); |
| 244 | 244 | if ($fs->exists($file)) { |
| 245 | 245 | $fs->remove($file); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | private $error = null; |
| 65 | 65 | private $encode = ''; |
| 66 | 66 | |
| 67 | - public function __construct(){ |
|
| 67 | + public function __construct() { |
|
| 68 | 68 | $this->encode = self::UTF; |
| 69 | 69 | if ('\\' === DIRECTORY_SEPARATOR) { |
| 70 | 70 | $this->encode = self::SJIS; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $arrFileList = $this->getFileList($app, $nowDir); |
| 114 | 114 | |
| 115 | 115 | $javascript = $this->getJsArrayList($tree); |
| 116 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
| 116 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
| 117 | 117 | |
| 118 | 118 | return [ |
| 119 | 119 | 'form' => $form->createView(), |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
| 175 | 175 | ? $this->normalizePath($request->get('now_dir')) |
| 176 | 176 | : $topDir; |
| 177 | - $fs->mkdir($nowDir . '/' . $filename); |
|
| 177 | + $fs->mkdir($nowDir.'/'.$filename); |
|
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | { |
| 260 | 260 | $str = "arrTree = new Array();\n"; |
| 261 | 261 | foreach ($tree as $key => $val) { |
| 262 | - $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['rank'] . ','; |
|
| 262 | + $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['rank'].','; |
|
| 263 | 263 | if ($val['open']) { |
| 264 | 264 | $str .= "true);\n"; |
| 265 | 265 | } else { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | private function getFileList($app, $nowDir) |
| 311 | 311 | { |
| 312 | 312 | $topDir = $this->appConfig['user_data_realdir']; |
| 313 | - $filter = function (\SplFileInfo $file) use ($topDir) { |
|
| 313 | + $filter = function(\SplFileInfo $file) use ($topDir) { |
|
| 314 | 314 | $acceptPath = realpath($topDir); |
| 315 | 315 | $targetPath = $file->getRealPath(); |
| 316 | 316 | return (strpos($targetPath, $acceptPath) === 0); |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | { |
| 123 | 123 | // install.phpのチェック. |
| 124 | 124 | if (isset($this->appConfig['eccube_install']) && $this->appConfig['eccube_install'] == 1) { |
| 125 | - $file = $this->appConfig['root_dir'] . '/html/install.php'; |
|
| 125 | + $file = $this->appConfig['root_dir'].'/html/install.php'; |
|
| 126 | 126 | if (file_exists($file)) { |
| 127 | 127 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'html/install.php')); |
| 128 | 128 | $app->addWarning($message, 'admin'); |
| 129 | 129 | } |
| 130 | - $fileOnRoot = $this->appConfig['root_dir'] . '/install.php'; |
|
| 130 | + $fileOnRoot = $this->appConfig['root_dir'].'/install.php'; |
|
| 131 | 131 | if (file_exists($fileOnRoot)) { |
| 132 | 132 | $message = $app->trans('admin.install.warning', array('installphpPath' => 'install.php')); |
| 133 | 133 | $app->addWarning($message, 'admin'); |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | t1.status |
| 376 | 376 | ORDER BY |
| 377 | 377 | t1.status'; |
| 378 | - $rsm = new ResultSetMapping();; |
|
| 378 | + $rsm = new ResultSetMapping(); ; |
|
| 379 | 379 | $rsm->addScalarResult('status', 'status'); |
| 380 | 380 | $rsm->addScalarResult('count', 'count'); |
| 381 | 381 | $query = $em->createNativeQuery($sql, $rsm); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $em->getConfiguration()->setSQLLogger(null); |
| 328 | 328 | |
| 329 | 329 | $response = new StreamedResponse(); |
| 330 | - $response->setCallback(function () use ($app, $request) { |
|
| 330 | + $response->setCallback(function() use ($app, $request) { |
|
| 331 | 331 | |
| 332 | 332 | // CSV種別を元に初期化. |
| 333 | 333 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_CUSTOMER); |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | |
| 342 | 342 | // データ行の出力. |
| 343 | 343 | $this->csvExportService->setExportQueryBuilder($qb); |
| 344 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 344 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 345 | 345 | |
| 346 | 346 | $Csvs = $csvService->getCsvs(); |
| 347 | 347 | |
@@ -376,9 +376,9 @@ discard block |
||
| 376 | 376 | }); |
| 377 | 377 | |
| 378 | 378 | $now = new \DateTime(); |
| 379 | - $filename = 'customer_' . $now->format('YmdHis') . '.csv'; |
|
| 379 | + $filename = 'customer_'.$now->format('YmdHis').'.csv'; |
|
| 380 | 380 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 381 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 381 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 382 | 382 | |
| 383 | 383 | $response->send(); |
| 384 | 384 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $em->getConfiguration()->setSQLLogger(null); |
| 273 | 273 | |
| 274 | 274 | $response = new StreamedResponse(); |
| 275 | - $response->setCallback(function () use ($app, $request) { |
|
| 275 | + $response->setCallback(function() use ($app, $request) { |
|
| 276 | 276 | |
| 277 | 277 | // CSV種別を元に初期化. |
| 278 | 278 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_CATEGORY); |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | // データ行の出力. |
| 288 | 288 | $this->csvExportService->setExportQueryBuilder($qb); |
| 289 | - $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 289 | + $this->csvExportService->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 290 | 290 | |
| 291 | 291 | $Csvs = $csvService->getCsvs(); |
| 292 | 292 | |
@@ -319,9 +319,9 @@ discard block |
||
| 319 | 319 | }); |
| 320 | 320 | |
| 321 | 321 | $now = new \DateTime(); |
| 322 | - $filename = 'category_' . $now->format('YmdHis') . '.csv'; |
|
| 322 | + $filename = 'category_'.$now->format('YmdHis').'.csv'; |
|
| 323 | 323 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 324 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 324 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 325 | 325 | $response->send(); |
| 326 | 326 | |
| 327 | 327 | log_info('カテゴリCSV出力ファイル名', array($filename)); |
@@ -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 | |