@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | foreach ($data as $row) { |
109 | 109 | |
110 | 110 | if ($headerSize != count($row)) { |
111 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
111 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
112 | 112 | return $this->render($app, $form, $headers, $this->productTwig); |
113 | 113 | } |
114 | 114 | |
@@ -119,33 +119,33 @@ discard block |
||
119 | 119 | if (preg_match('/^\d+$/', $row['商品ID'])) { |
120 | 120 | $Product = $app['eccube.repository.product']->find($row['商品ID']); |
121 | 121 | if (!$Product) { |
122 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
122 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
123 | 123 | return $this->render($app, $form, $headers, $this->productTwig); |
124 | 124 | } |
125 | 125 | } else { |
126 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
126 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
127 | 127 | return $this->render($app, $form, $headers, $this->productTwig); |
128 | 128 | } |
129 | 129 | |
130 | 130 | } |
131 | 131 | |
132 | 132 | if ($row['公開ステータス(ID)'] == '') { |
133 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。'); |
|
133 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。'); |
|
134 | 134 | } else { |
135 | 135 | if (preg_match('/^\d+$/', $row['公開ステータス(ID)'])) { |
136 | 136 | $Disp = $app['eccube.repository.master.disp']->find($row['公開ステータス(ID)']); |
137 | 137 | if (!$Disp) { |
138 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
138 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
139 | 139 | } else { |
140 | 140 | $Product->setStatus($Disp); |
141 | 141 | } |
142 | 142 | } else { |
143 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
143 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
147 | 147 | if (Str::isBlank($row['商品名'])) { |
148 | - $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。'); |
|
148 | + $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。'); |
|
149 | 149 | return $this->render($app, $form, $headers, $this->productTwig); |
150 | 150 | } else { |
151 | 151 | $Product->setName(Str::trimAll($row['商品名'])); |
@@ -184,10 +184,10 @@ discard block |
||
184 | 184 | if ($row['商品削除フラグ'] == '') { |
185 | 185 | $Product->setDelFlg(Constant::DISABLED); |
186 | 186 | } else { |
187 | - if ($row['商品削除フラグ'] == (string)Constant::DISABLED || $row['商品削除フラグ'] == (string)Constant::ENABLED) { |
|
187 | + if ($row['商品削除フラグ'] == (string) Constant::DISABLED || $row['商品削除フラグ'] == (string) Constant::ENABLED) { |
|
188 | 188 | $Product->setDelFlg($row['商品削除フラグ']); |
189 | 189 | } else { |
190 | - $this->addErrors(($data->key() + 1) . '行目の商品削除フラグが設定されていません。'); |
|
190 | + $this->addErrors(($data->key() + 1).'行目の商品削除フラグが設定されていません。'); |
|
191 | 191 | return $this->render($app, $form, $headers, $this->productTwig); |
192 | 192 | } |
193 | 193 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
215 | 215 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
216 | 216 | } else { |
217 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
217 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | if ($row['規格分類1(ID)'] != '') { |
223 | 223 | |
224 | 224 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
225 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
225 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
226 | 226 | } else { |
227 | 227 | // 商品規格あり |
228 | 228 | // 企画分類あり商品を作成 |
@@ -237,30 +237,30 @@ discard block |
||
237 | 237 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
238 | 238 | $ClassCategory1 = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
239 | 239 | if (!$ClassCategory1) { |
240 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
240 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
241 | 241 | } else { |
242 | 242 | $ProductClass->setClassCategory1($ClassCategory1); |
243 | 243 | } |
244 | 244 | } else { |
245 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
245 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | if ($row['規格分類2(ID)'] != '') { |
249 | 249 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
250 | 250 | $ClassCategory2 = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
251 | 251 | if (!$ClassCategory2) { |
252 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
252 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
253 | 253 | } else { |
254 | 254 | if ($ClassCategory1 && |
255 | 255 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
256 | 256 | ) { |
257 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
257 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
258 | 258 | } else { |
259 | 259 | $ProductClass->setClassCategory2($ClassCategory2); |
260 | 260 | } |
261 | 261 | } |
262 | 262 | } else { |
263 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
263 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | $ProductClass->setProductStock($ProductStock); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | } else { |
274 | 274 | if ($row['規格分類2(ID)'] != '') { |
275 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
275 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
276 | 276 | } |
277 | 277 | } |
278 | 278 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
301 | 301 | $pc->setDeliveryFee($deliveryFee); |
302 | 302 | } else { |
303 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
303 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } |
323 | 323 | |
324 | 324 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
325 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
325 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
326 | 326 | } else { |
327 | 327 | |
328 | 328 | // 必ず規格分類1がセットされている |
@@ -331,36 +331,36 @@ discard block |
||
331 | 331 | if (preg_match('/^\d+$/', $classCategoryId1)) { |
332 | 332 | $ClassCategory1 = $app['eccube.repository.class_category']->find($classCategoryId1); |
333 | 333 | if (!$ClassCategory1) { |
334 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
334 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
335 | 335 | } |
336 | 336 | } else { |
337 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
337 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | $ClassCategory2 = null; |
341 | 341 | if ($row['規格分類2(ID)'] != '') { |
342 | 342 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
343 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
343 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
344 | 344 | } else { |
345 | 345 | if (preg_match('/^\d+$/', $classCategoryId2)) { |
346 | 346 | $ClassCategory2 = $app['eccube.repository.class_category']->find($classCategoryId2); |
347 | 347 | if (!$ClassCategory2) { |
348 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
348 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
349 | 349 | } else { |
350 | 350 | if ($ClassCategory1 && |
351 | 351 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
352 | 352 | ) { |
353 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
353 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
354 | 354 | } |
355 | 355 | } |
356 | 356 | } else { |
357 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
357 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | } |
361 | 361 | } else { |
362 | 362 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
363 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
363 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
364 | 364 | } |
365 | 365 | } |
366 | 366 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
372 | 372 | $ProductClass->setDeliveryFee($deliveryFee); |
373 | 373 | } else { |
374 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
374 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
375 | 375 | } |
376 | 376 | } |
377 | 377 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | foreach ($data as $row) { |
459 | 459 | |
460 | 460 | if ($headerSize != count($row)) { |
461 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
461 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
462 | 462 | return $this->render($app, $form, $headers, $this->categoryTwig); |
463 | 463 | } |
464 | 464 | |
@@ -466,23 +466,23 @@ discard block |
||
466 | 466 | $Category = new Category(); |
467 | 467 | } else { |
468 | 468 | if (!preg_match('/^\d+$/', $row['カテゴリID'])) { |
469 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
469 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
470 | 470 | return $this->render($app, $form, $headers, $this->categoryTwig); |
471 | 471 | } |
472 | 472 | $Category = $app['eccube.repository.category']->find($row['カテゴリID']); |
473 | 473 | if (!$Category) { |
474 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
474 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
475 | 475 | return $this->render($app, $form, $headers, $this->categoryTwig); |
476 | 476 | } |
477 | 477 | if ($row['カテゴリID'] == $row['親カテゴリID']) { |
478 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
478 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
479 | 479 | return $this->render($app, $form, $headers, $this->categoryTwig); |
480 | 480 | } |
481 | 481 | |
482 | 482 | } |
483 | 483 | |
484 | 484 | if (Str::isBlank($row['カテゴリ名'])) { |
485 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。'); |
|
485 | + $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。'); |
|
486 | 486 | return $this->render($app, $form, $headers, $this->categoryTwig); |
487 | 487 | } else { |
488 | 488 | $Category->setName(Str::trimAll($row['カテゴリ名'])); |
@@ -491,13 +491,13 @@ discard block |
||
491 | 491 | if ($row['親カテゴリID'] != '') { |
492 | 492 | |
493 | 493 | if (!preg_match('/^\d+$/', $row['親カテゴリID'])) { |
494 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
494 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
495 | 495 | return $this->render($app, $form, $headers, $this->categoryTwig); |
496 | 496 | } |
497 | 497 | |
498 | 498 | $ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']); |
499 | 499 | if (!$ParentCategory) { |
500 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
500 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
501 | 501 | return $this->render($app, $form, $headers, $this->categoryTwig); |
502 | 502 | } |
503 | 503 | |
@@ -513,14 +513,14 @@ discard block |
||
513 | 513 | } |
514 | 514 | |
515 | 515 | if ($app['config']['category_nest_level'] < $Category->getLevel()) { |
516 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
516 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
517 | 517 | return $this->render($app, $form, $headers, $this->categoryTwig); |
518 | 518 | } |
519 | 519 | |
520 | 520 | $status = $app['eccube.repository.category']->save($Category); |
521 | 521 | |
522 | 522 | if (!$status) { |
523 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが設定できません。'); |
|
523 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが設定できません。'); |
|
524 | 524 | } |
525 | 525 | |
526 | 526 | if ($this->hasErrors()) { |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | throw new NotFoundHttpException(); |
566 | 566 | } |
567 | 567 | |
568 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
568 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
569 | 569 | |
570 | 570 | // ヘッダ行の出力 |
571 | 571 | $row = array(); |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | }); |
581 | 581 | |
582 | 582 | $response->headers->set('Content-Type', 'application/octet-stream'); |
583 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
583 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
584 | 584 | $response->send(); |
585 | 585 | |
586 | 586 | return $response; |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | if (!empty($this->fileName)) { |
604 | 604 | try { |
605 | 605 | $fs = new Filesystem(); |
606 | - $fs->remove($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
606 | + $fs->remove($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
607 | 607 | } catch (\Exception $e) { |
608 | 608 | // エラーが発生しても無視する |
609 | 609 | } |
@@ -626,10 +626,10 @@ discard block |
||
626 | 626 | protected function getImportData($app, $formFile) |
627 | 627 | { |
628 | 628 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
629 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
629 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
630 | 630 | $formFile->move($app['config']['csv_temp_realdir'], $this->fileName); |
631 | 631 | |
632 | - $file = file_get_contents($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
632 | + $file = file_get_contents($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
633 | 633 | |
634 | 634 | if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) { |
635 | 635 | // Windows 環境の PHP7 の場合はファイルエンコーディングを CP932 に合わせる |
@@ -725,8 +725,8 @@ discard block |
||
725 | 725 | if (!$Category) { |
726 | 726 | $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。'); |
727 | 727 | } else { |
728 | - foreach($Category->getPath() as $ParentCategory){ |
|
729 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
728 | + foreach ($Category->getPath() as $ParentCategory) { |
|
729 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
730 | 730 | $ProductCategory = $this->makeProductCategory($Product, $ParentCategory, $rank); |
731 | 731 | $app['orm.em']->persist($ProductCategory); |
732 | 732 | $rank++; |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | $categoriesIdList[$ParentCategory->getId()] = true; |
735 | 735 | } |
736 | 736 | } |
737 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
737 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
738 | 738 | $ProductCategory = $this->makeProductCategory($Product, $Category, $rank); |
739 | 739 | $rank++; |
740 | 740 | $this->em->persist($ProductCategory); |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | } |
790 | 790 | } |
791 | 791 | if (!$Tag) { |
792 | - $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。'); |
|
792 | + $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。'); |
|
793 | 793 | } |
794 | 794 | } |
795 | 795 | } |
@@ -807,17 +807,17 @@ discard block |
||
807 | 807 | |
808 | 808 | |
809 | 809 | if ($row['商品種別(ID)'] == '') { |
810 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
810 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
811 | 811 | } else { |
812 | 812 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
813 | 813 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
814 | 814 | if (!$ProductType) { |
815 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
815 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
816 | 816 | } else { |
817 | 817 | $ProductClass->setProductType($ProductType); |
818 | 818 | } |
819 | 819 | } else { |
820 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
820 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
821 | 821 | } |
822 | 822 | } |
823 | 823 | |
@@ -828,12 +828,12 @@ discard block |
||
828 | 828 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
829 | 829 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
830 | 830 | if (!$DeliveryDate) { |
831 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
831 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
832 | 832 | } else { |
833 | 833 | $ProductClass->setDeliveryDate($DeliveryDate); |
834 | 834 | } |
835 | 835 | } else { |
836 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
836 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
837 | 837 | } |
838 | 838 | } |
839 | 839 | |
@@ -844,19 +844,19 @@ discard block |
||
844 | 844 | } |
845 | 845 | |
846 | 846 | if ($row['在庫数無制限フラグ'] == '') { |
847 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
847 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
848 | 848 | } else { |
849 | 849 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
850 | 850 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
851 | 851 | // 在庫数が設定されていなければエラー |
852 | 852 | if ($row['在庫数'] == '') { |
853 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
853 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
854 | 854 | } else { |
855 | 855 | $stock = str_replace(',', '', $row['在庫数']); |
856 | 856 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
857 | 857 | $ProductClass->setStock($stock); |
858 | 858 | } else { |
859 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
859 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
860 | 860 | } |
861 | 861 | } |
862 | 862 | |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
865 | 865 | $ProductClass->setStock(null); |
866 | 866 | } else { |
867 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
867 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
868 | 868 | } |
869 | 869 | } |
870 | 870 | |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
874 | 874 | $ProductClass->setSaleLimit($saleLimit); |
875 | 875 | } else { |
876 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
876 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
877 | 877 | } |
878 | 878 | } |
879 | 879 | |
@@ -882,18 +882,18 @@ discard block |
||
882 | 882 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
883 | 883 | $ProductClass->setPrice01($price01); |
884 | 884 | } else { |
885 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
885 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
886 | 886 | } |
887 | 887 | } |
888 | 888 | |
889 | 889 | if ($row['販売価格'] == '') { |
890 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
890 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
891 | 891 | } else { |
892 | 892 | $price02 = str_replace(',', '', $row['販売価格']); |
893 | 893 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
894 | 894 | $ProductClass->setPrice02($price02); |
895 | 895 | } else { |
896 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
896 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
897 | 897 | } |
898 | 898 | } |
899 | 899 | |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | if (preg_match('/^\d+$/', $delivery_fee) && $delivery_fee >= 0) { |
903 | 903 | $ProductClass->setDeliveryFee($delivery_fee); |
904 | 904 | } else { |
905 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
905 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
906 | 906 | } |
907 | 907 | } |
908 | 908 | |
@@ -912,7 +912,7 @@ discard block |
||
912 | 912 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
913 | 913 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
914 | 914 | } else { |
915 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
915 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
916 | 916 | } |
917 | 917 | } |
918 | 918 | |
@@ -945,17 +945,17 @@ discard block |
||
945 | 945 | $ProductClass->setProduct($Product); |
946 | 946 | |
947 | 947 | if ($row['商品種別(ID)'] == '') { |
948 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
948 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
949 | 949 | } else { |
950 | 950 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
951 | 951 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
952 | 952 | if (!$ProductType) { |
953 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
953 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
954 | 954 | } else { |
955 | 955 | $ProductClass->setProductType($ProductType); |
956 | 956 | } |
957 | 957 | } else { |
958 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
958 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
959 | 959 | } |
960 | 960 | } |
961 | 961 | |
@@ -964,12 +964,12 @@ discard block |
||
964 | 964 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
965 | 965 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
966 | 966 | if (!$ClassCategory) { |
967 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
967 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
968 | 968 | } else { |
969 | 969 | $ProductClass->setClassCategory1($ClassCategory); |
970 | 970 | } |
971 | 971 | } else { |
972 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
972 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
973 | 973 | } |
974 | 974 | } |
975 | 975 | |
@@ -977,12 +977,12 @@ discard block |
||
977 | 977 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
978 | 978 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
979 | 979 | if (!$ClassCategory) { |
980 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
980 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
981 | 981 | } else { |
982 | 982 | $ProductClass->setClassCategory2($ClassCategory); |
983 | 983 | } |
984 | 984 | } else { |
985 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
985 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
986 | 986 | } |
987 | 987 | } |
988 | 988 | |
@@ -990,12 +990,12 @@ discard block |
||
990 | 990 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
991 | 991 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
992 | 992 | if (!$DeliveryDate) { |
993 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
993 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
994 | 994 | } else { |
995 | 995 | $ProductClass->setDeliveryDate($DeliveryDate); |
996 | 996 | } |
997 | 997 | } else { |
998 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
998 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
999 | 999 | } |
1000 | 1000 | } |
1001 | 1001 | |
@@ -1006,19 +1006,19 @@ discard block |
||
1006 | 1006 | } |
1007 | 1007 | |
1008 | 1008 | if ($row['在庫数無制限フラグ'] == '') { |
1009 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1009 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1010 | 1010 | } else { |
1011 | 1011 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
1012 | 1012 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
1013 | 1013 | // 在庫数が設定されていなければエラー |
1014 | 1014 | if ($row['在庫数'] == '') { |
1015 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
1015 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
1016 | 1016 | } else { |
1017 | 1017 | $stock = str_replace(',', '', $row['在庫数']); |
1018 | 1018 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
1019 | 1019 | $ProductClass->setStock($row['在庫数']); |
1020 | 1020 | } else { |
1021 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
1021 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
1022 | 1022 | } |
1023 | 1023 | } |
1024 | 1024 | |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
1027 | 1027 | $ProductClass->setStock(null); |
1028 | 1028 | } else { |
1029 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1029 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1030 | 1030 | } |
1031 | 1031 | } |
1032 | 1032 | |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
1036 | 1036 | $ProductClass->setSaleLimit($saleLimit); |
1037 | 1037 | } else { |
1038 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
1038 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
1039 | 1039 | } |
1040 | 1040 | } |
1041 | 1041 | |
@@ -1044,18 +1044,18 @@ discard block |
||
1044 | 1044 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
1045 | 1045 | $ProductClass->setPrice01($price01); |
1046 | 1046 | } else { |
1047 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
1047 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
1048 | 1048 | } |
1049 | 1049 | } |
1050 | 1050 | |
1051 | 1051 | if ($row['販売価格'] == '') { |
1052 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
1052 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
1053 | 1053 | } else { |
1054 | 1054 | $price02 = str_replace(',', '', $row['販売価格']); |
1055 | 1055 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
1056 | 1056 | $ProductClass->setPrice02($price02); |
1057 | 1057 | } else { |
1058 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
1058 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
1059 | 1059 | } |
1060 | 1060 | } |
1061 | 1061 | |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
1066 | 1066 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
1067 | 1067 | } else { |
1068 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
1068 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
1069 | 1069 | } |
1070 | 1070 | } |
1071 | 1071 |
@@ -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( |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | { |
68 | 68 | public function register(Application $app) |
69 | 69 | { |
70 | - $app['var_dumper.cloner'] = $app->share(function ($app) { |
|
70 | + $app['var_dumper.cloner'] = $app->share(function($app) { |
|
71 | 71 | $cloner = new VarCloner(); |
72 | 72 | |
73 | 73 | if (isset($app['debug.max_items'])) { |
@@ -81,23 +81,23 @@ discard block |
||
81 | 81 | return $cloner; |
82 | 82 | }); |
83 | 83 | |
84 | - $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function ($templates) { |
|
84 | + $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function($templates) { |
|
85 | 85 | return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig'))); |
86 | 86 | })); |
87 | 87 | |
88 | - $app['data_collector.dump'] = $app->share(function ($app) { |
|
88 | + $app['data_collector.dump'] = $app->share(function($app) { |
|
89 | 89 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format'], null, null, new HtmlDumper()); |
90 | 90 | }); |
91 | 91 | |
92 | - $app['data_collectors'] = $app->share($app->extend('data_collectors', function ($collectors, $app) { |
|
93 | - $collectors['dump'] = $app->share(function ($app) { |
|
92 | + $app['data_collectors'] = $app->share($app->extend('data_collectors', function($collectors, $app) { |
|
93 | + $collectors['dump'] = $app->share(function($app) { |
|
94 | 94 | return $app['data_collector.dump']; |
95 | 95 | }); |
96 | 96 | |
97 | 97 | return $collectors; |
98 | 98 | })); |
99 | 99 | |
100 | - $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) { |
|
100 | + $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { |
|
101 | 101 | if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { |
102 | 102 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); |
103 | 103 | } |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | return $twig; |
106 | 106 | })); |
107 | 107 | |
108 | - $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) { |
|
108 | + $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function($loader, $app) { |
|
109 | 109 | $loader->addPath($app['debug.templates_path'], 'Debug'); |
110 | 110 | |
111 | 111 | return $loader; |
112 | 112 | })); |
113 | 113 | |
114 | - $app['debug.templates_path'] = function () { |
|
114 | + $app['debug.templates_path'] = function() { |
|
115 | 115 | $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); |
116 | 116 | |
117 | 117 | return dirname(dirname($r->getFileName())).'/Resources/views'; |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | // This code is here to lazy load the dump stack. This default |
124 | 124 | // configuration for CLI mode is overridden in HTTP mode on |
125 | 125 | // 'kernel.request' event |
126 | - VarDumper::setHandler(function ($var) use ($app) { |
|
126 | + VarDumper::setHandler(function($var) use ($app) { |
|
127 | 127 | $dumper = $app['data_collector.dump']; |
128 | 128 | $cloner = $app['var_dumper.cloner']; |
129 | 129 | |
130 | - $handler = function ($var) use ($dumper, $cloner) { |
|
130 | + $handler = function($var) use ($dumper, $cloner) { |
|
131 | 131 | $dumper->dump($cloner->cloneVar($var)); |
132 | 132 | }; |
133 | 133 |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | |
57 | 57 | public function __construct() |
58 | 58 | { |
59 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
60 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
61 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
59 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
60 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
61 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | private function isValid(Request $request, Form $form) |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | return $app['twig']->render('step1.twig', array( |
110 | 110 | 'form' => $form->createView(), |
111 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
111 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
112 | 112 | )); |
113 | 113 | } |
114 | 114 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | return $app['twig']->render('step2.twig', array( |
133 | 133 | 'protectedDirs' => $protectedDirs, |
134 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
134 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
135 | 135 | )); |
136 | 136 | } |
137 | 137 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | if (empty($sessionData['shop_name'])) { |
147 | 147 | |
148 | - $config_file = $this->config_path . '/config.yml'; |
|
148 | + $config_file = $this->config_path.'/config.yml'; |
|
149 | 149 | $fs = new Filesystem(); |
150 | 150 | |
151 | 151 | if ($fs->exists($config_file)) { |
@@ -159,11 +159,11 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | // セキュリティの設定 |
162 | - $config_file = $this->config_path . '/path.yml'; |
|
162 | + $config_file = $this->config_path.'/path.yml'; |
|
163 | 163 | $config = Yaml::parse(file_get_contents($config_file)); |
164 | 164 | $sessionData['admin_dir'] = $config['admin_route']; |
165 | 165 | |
166 | - $config_file = $this->config_path . '/config.yml'; |
|
166 | + $config_file = $this->config_path.'/config.yml'; |
|
167 | 167 | $config = Yaml::parse(file_get_contents($config_file)); |
168 | 168 | |
169 | 169 | $allowHost = $config['admin_allow_host']; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
174 | 174 | |
175 | 175 | // メール設定 |
176 | - $config_file = $this->config_path . '/mail.yml'; |
|
176 | + $config_file = $this->config_path.'/mail.yml'; |
|
177 | 177 | $config = Yaml::parse(file_get_contents($config_file)); |
178 | 178 | $mail = $config['mail']; |
179 | 179 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | return $app['twig']->render('step3.twig', array( |
198 | 198 | 'form' => $form->createView(), |
199 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
199 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
200 | 200 | )); |
201 | 201 | } |
202 | 202 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | if (empty($sessionData['database'])) { |
213 | 213 | |
214 | - $config_file = $this->config_path . '/database.yml'; |
|
214 | + $config_file = $this->config_path.'/database.yml'; |
|
215 | 215 | $fs = new Filesystem(); |
216 | 216 | |
217 | 217 | if ($fs->exists($config_file)) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | return $app['twig']->render('step4.twig', array( |
241 | 241 | 'form' => $form->createView(), |
242 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
242 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
243 | 243 | )); |
244 | 244 | } |
245 | 245 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $host = $request->getSchemeAndHttpHost(); |
286 | 286 | $basePath = $request->getBasePath(); |
287 | 287 | $params = array( |
288 | - 'http_url' => $host . $basePath, |
|
288 | + 'http_url' => $host.$basePath, |
|
289 | 289 | 'shop_name' => $sessionData['shop_name'], |
290 | 290 | ); |
291 | 291 | |
@@ -300,24 +300,24 @@ discard block |
||
300 | 300 | |
301 | 301 | return $app['twig']->render('step5.twig', array( |
302 | 302 | 'form' => $form->createView(), |
303 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
303 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
304 | 304 | )); |
305 | 305 | } |
306 | 306 | |
307 | 307 | // インストール完了 |
308 | 308 | public function complete(InstallApplication $app, Request $request) |
309 | 309 | { |
310 | - $config_file = $this->config_path . '/path.yml'; |
|
310 | + $config_file = $this->config_path.'/path.yml'; |
|
311 | 311 | $config = Yaml::parse(file_get_contents($config_file)); |
312 | 312 | |
313 | 313 | $host = $request->getSchemeAndHttpHost(); |
314 | 314 | $basePath = $request->getBasePath(); |
315 | 315 | |
316 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
316 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
317 | 317 | |
318 | 318 | return $app['twig']->render('complete.twig', array( |
319 | 319 | 'admin_url' => $adminUrl, |
320 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
320 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
321 | 321 | )); |
322 | 322 | } |
323 | 323 | |
@@ -333,12 +333,12 @@ discard block |
||
333 | 333 | { |
334 | 334 | foreach ($this->required_modules as $module) { |
335 | 335 | if (!extension_loaded($module)) { |
336 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
336 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
340 | 340 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
341 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
341 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | foreach ($this->recommended_module as $module) { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | if (!function_exists('apache_get_modules')) { |
367 | 367 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
368 | 368 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
369 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
369 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
370 | 370 | } |
371 | 371 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
372 | 372 | // iis |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | private function setPDO() |
379 | 379 | { |
380 | - $config_file = $this->config_path . '/database.yml'; |
|
380 | + $config_file = $this->config_path.'/database.yml'; |
|
381 | 381 | $config = Yaml::parse(file_get_contents($config_file)); |
382 | 382 | |
383 | 383 | try { |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | */ |
412 | 412 | private function getEntityManager() |
413 | 413 | { |
414 | - $config_file = $this->config_path . '/database.yml'; |
|
414 | + $config_file = $this->config_path.'/database.yml'; |
|
415 | 415 | $database = Yaml::parse(file_get_contents($config_file)); |
416 | 416 | |
417 | 417 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -419,15 +419,15 @@ discard block |
||
419 | 419 | )); |
420 | 420 | |
421 | 421 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
422 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
422 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
423 | 423 | 'orm.em.options' => array( |
424 | 424 | 'mappings' => array( |
425 | 425 | array( |
426 | 426 | 'type' => 'yml', |
427 | 427 | 'namespace' => 'Eccube\Entity', |
428 | 428 | 'path' => array( |
429 | - __DIR__ . '/../../Resource/doctrine', |
|
430 | - __DIR__ . '/../../Resource/doctrine/master', |
|
429 | + __DIR__.'/../../Resource/doctrine', |
|
430 | + __DIR__.'/../../Resource/doctrine/master', |
|
431 | 431 | ), |
432 | 432 | ), |
433 | 433 | ), |
@@ -454,11 +454,11 @@ discard block |
||
454 | 454 | { |
455 | 455 | $this->resetNatTimer(); |
456 | 456 | |
457 | - $config_file = $this->config_path . '/database.yml'; |
|
457 | + $config_file = $this->config_path.'/database.yml'; |
|
458 | 458 | $database = Yaml::parse(file_get_contents($config_file)); |
459 | 459 | $config['database'] = $database['database']; |
460 | 460 | |
461 | - $config_file = $this->config_path . '/config.yml'; |
|
461 | + $config_file = $this->config_path.'/config.yml'; |
|
462 | 462 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
463 | 463 | $config['config'] = $baseConfig; |
464 | 464 | |
@@ -514,11 +514,11 @@ discard block |
||
514 | 514 | { |
515 | 515 | $this->resetNatTimer(); |
516 | 516 | |
517 | - $config_file = $this->config_path . '/database.yml'; |
|
517 | + $config_file = $this->config_path.'/database.yml'; |
|
518 | 518 | $database = Yaml::parse(file_get_contents($config_file)); |
519 | 519 | $config['database'] = $database['database']; |
520 | 520 | |
521 | - $config_file = $this->config_path . '/config.yml'; |
|
521 | + $config_file = $this->config_path.'/config.yml'; |
|
522 | 522 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
523 | 523 | $config['config'] = $baseConfig; |
524 | 524 | |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | $config = new Configuration($app['db']); |
582 | 582 | $config->setMigrationsNamespace('DoctrineMigrations'); |
583 | 583 | |
584 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
584 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
585 | 585 | $config->setMigrationsDirectory($migrationDir); |
586 | 586 | $config->registerMigrationsFromDirectory($migrationDir); |
587 | 587 | |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | private function getProtectedDirs() |
614 | 614 | { |
615 | 615 | $protectedDirs = array(); |
616 | - $base = __DIR__ . '/../../../..'; |
|
616 | + $base = __DIR__.'/../../../..'; |
|
617 | 617 | $dirs = array( |
618 | 618 | '/html', |
619 | 619 | '/app', |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | ); |
627 | 627 | |
628 | 628 | foreach ($dirs as $dir) { |
629 | - if (!is_writable($base . $dir)) { |
|
629 | + if (!is_writable($base.$dir)) { |
|
630 | 630 | $protectedDirs[] = $dir; |
631 | 631 | } |
632 | 632 | } |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | private function createConfigYamlFile($data, $auth = true) |
638 | 638 | { |
639 | 639 | $fs = new Filesystem(); |
640 | - $config_file = $this->config_path . '/config.yml'; |
|
640 | + $config_file = $this->config_path.'/config.yml'; |
|
641 | 641 | |
642 | 642 | if ($fs->exists($config_file)) { |
643 | 643 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | |
667 | 667 | $fs = new Filesystem(); |
668 | 668 | $content = str_replace( |
669 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
669 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
670 | 670 | ); |
671 | 671 | $fs->dumpFile($config_file, $content); |
672 | 672 | |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | |
681 | 681 | private function addInstallStatus() |
682 | 682 | { |
683 | - $config_file = $this->config_path . '/config.yml'; |
|
683 | + $config_file = $this->config_path.'/config.yml'; |
|
684 | 684 | $config = Yaml::parse(file_get_contents($config_file)); |
685 | 685 | $config['eccube_install'] = 1; |
686 | 686 | $yml = Yaml::dump($config); |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | private function createDatabaseYamlFile($data) |
693 | 693 | { |
694 | 694 | $fs = new Filesystem(); |
695 | - $config_file = $this->config_path . '/database.yml'; |
|
695 | + $config_file = $this->config_path.'/database.yml'; |
|
696 | 696 | if ($fs->exists($config_file)) { |
697 | 697 | $fs->remove($config_file); |
698 | 698 | } |
@@ -725,14 +725,14 @@ discard block |
||
725 | 725 | |
726 | 726 | $fs = new Filesystem(); |
727 | 727 | $content = str_replace( |
728 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
728 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
729 | 729 | ); |
730 | 730 | } else { |
731 | 731 | $content = Yaml::dump( |
732 | 732 | array( |
733 | 733 | 'database' => array( |
734 | 734 | 'driver' => 'pdo_sqlite', |
735 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
735 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
736 | 736 | ) |
737 | 737 | ) |
738 | 738 | ); |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | private function createMailYamlFile($data) |
746 | 746 | { |
747 | 747 | $fs = new Filesystem(); |
748 | - $config_file = $this->config_path . '/mail.yml'; |
|
748 | + $config_file = $this->config_path.'/mail.yml'; |
|
749 | 749 | if ($fs->exists($config_file)) { |
750 | 750 | $fs->remove($config_file); |
751 | 751 | } |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | |
761 | 761 | $fs = new Filesystem(); |
762 | 762 | $content = str_replace( |
763 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
763 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
764 | 764 | ); |
765 | 765 | $fs->dumpFile($config_file, $content); |
766 | 766 | |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | private function createPathYamlFile($data, Request $request) |
771 | 771 | { |
772 | 772 | $fs = new Filesystem(); |
773 | - $config_file = $this->config_path . '/path.yml'; |
|
773 | + $config_file = $this->config_path.'/path.yml'; |
|
774 | 774 | if ($fs->exists($config_file)) { |
775 | 775 | $fs->remove($config_file); |
776 | 776 | } |
@@ -778,16 +778,16 @@ discard block |
||
778 | 778 | $ADMIN_ROUTE = $data['admin_dir']; |
779 | 779 | $TEMPLATE_CODE = 'default'; |
780 | 780 | $USER_DATA_ROUTE = 'user_data'; |
781 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
781 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
782 | 782 | $ROOT_URLPATH = $request->getBasePath(); |
783 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
783 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
784 | 784 | |
785 | 785 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
786 | 786 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
787 | 787 | |
788 | 788 | $fs = new Filesystem(); |
789 | 789 | $content = str_replace( |
790 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
790 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
791 | 791 | ); |
792 | 792 | $fs->dumpFile($config_file, $content); |
793 | 793 | |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | |
797 | 797 | private function sendAppData($params) |
798 | 798 | { |
799 | - $config_file = $this->config_path . '/database.yml'; |
|
799 | + $config_file = $this->config_path.'/database.yml'; |
|
800 | 800 | $db_config = Yaml::parse(file_get_contents($config_file)); |
801 | 801 | |
802 | 802 | $this->setPDO(); |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | } |
809 | 809 | |
810 | 810 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
811 | - $db_ver = 'MySQL:' . $version; |
|
811 | + $db_ver = 'MySQL:'.$version; |
|
812 | 812 | } else { |
813 | 813 | $db_ver = $version; |
814 | 814 | } |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | |
827 | 827 | $header = array( |
828 | 828 | 'Content-Type: application/x-www-form-urlencoded', |
829 | - 'Content-Length: ' . strlen($data), |
|
829 | + 'Content-Length: '.strlen($data), |
|
830 | 830 | ); |
831 | 831 | $context = stream_context_create( |
832 | 832 | array( |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | public function migration(InstallApplication $app, Request $request) |
854 | 854 | { |
855 | 855 | return $app['twig']->render('migration.twig', array( |
856 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
856 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
857 | 857 | )); |
858 | 858 | } |
859 | 859 | |
@@ -882,7 +882,7 @@ discard block |
||
882 | 882 | return $app['twig']->render('migration_plugin.twig', array( |
883 | 883 | 'Plugins' => $Plugins, |
884 | 884 | 'version' => Constant::VERSION, |
885 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
885 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
886 | 886 | )); |
887 | 887 | } |
888 | 888 | } |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | \Eccube\Util\Cache::clear($config_app, true); |
906 | 906 | |
907 | 907 | return $app['twig']->render('migration_end.twig', array( |
908 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
908 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
909 | 909 | )); |
910 | 910 | } |
911 | 911 | } |
@@ -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 |
@@ -27,12 +27,12 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | //[INFO]index.php,install.phpをEC-CUBEルート直下に移動させる場合は、コメントアウトしている行に置き換える |
30 | -require __DIR__ . '/../autoload.php'; |
|
30 | +require __DIR__.'/../autoload.php'; |
|
31 | 31 | //require __DIR__ . '/autoload.php'; |
32 | 32 | |
33 | 33 | $app = new Eccube\InstallApplication(); |
34 | 34 | $app['debug'] = true; |
35 | -$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
35 | +$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
36 | 36 | if (!$request->getSession()->isStarted()) { |
37 | 37 | $request->getSession()->start(); |
38 | 38 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | //require __DIR__.'/autoload.php'; |
28 | 28 | |
29 | 29 | ini_set('display_errors', 'Off'); |
30 | -error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); |
|
30 | +error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT); |
|
31 | 31 | |
32 | 32 | // see http://silex.sensiolabs.org/doc/web_servers.html#php-5-4 |
33 | 33 | $filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); |
@@ -53,8 +53,8 @@ |
||
53 | 53 | 'constraints' => array( |
54 | 54 | new Assert\NotBlank(array('message' => 'ファイルを選択してください。')), |
55 | 55 | new Assert\File(array( |
56 | - 'maxSize' => $app['config']['csv_size'] . 'M', |
|
57 | - 'maxSizeMessage' => 'CSVファイルは' . $app['config']['csv_size'] . 'M以下でアップロードしてください。', |
|
56 | + 'maxSize' => $app['config']['csv_size'].'M', |
|
57 | + 'maxSizeMessage' => 'CSVファイルは'.$app['config']['csv_size'].'M以下でアップロードしてください。', |
|
58 | 58 | )), |
59 | 59 | ), |
60 | 60 | )); |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_list']->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_list']->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |