@@ -230,6 +230,10 @@ discard block |
||
230 | 230 | return $str; |
231 | 231 | } |
232 | 232 | |
233 | + /** |
|
234 | + * @param string $topDir |
|
235 | + * @param Request $request |
|
236 | + */ |
|
233 | 237 | private function getTree($topDir, $request) |
234 | 238 | { |
235 | 239 | $finder = Finder::create()->in($topDir) |
@@ -267,6 +271,10 @@ discard block |
||
267 | 271 | return $tree; |
268 | 272 | } |
269 | 273 | |
274 | + /** |
|
275 | + * @param Application $app |
|
276 | + * @param string $nowDir |
|
277 | + */ |
|
270 | 278 | private function getFileList($app, $nowDir) |
271 | 279 | { |
272 | 280 | $topDir = $app['config']['user_data_realdir']; |
@@ -326,6 +334,9 @@ discard block |
||
326 | 334 | return (strpos($targetDir, $topDir) === 0); |
327 | 335 | } |
328 | 336 | |
337 | + /** |
|
338 | + * @return string |
|
339 | + */ |
|
329 | 340 | private function convertStrFromServer($target) |
330 | 341 | { |
331 | 342 | if ($this->encode == self::SJIS) { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | private $error = null; |
40 | 40 | private $encode = ''; |
41 | 41 | |
42 | - public function __construct(){ |
|
42 | + public function __construct() { |
|
43 | 43 | $this->encode = self::UTF; |
44 | 44 | if ('\\' === DIRECTORY_SEPARATOR) { |
45 | 45 | $this->encode = self::SJIS; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $arrFileList = $this->getFileList($app, $nowDir); |
83 | 83 | |
84 | 84 | $javascript = $this->getJsArrayList($tree); |
85 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
85 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
86 | 86 | |
87 | 87 | return $app->render('Content/file.twig', array( |
88 | 88 | 'form' => $form->createView(), |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
140 | 140 | ? $this->normalizePath($request->get('now_dir')) |
141 | 141 | : $topDir; |
142 | - $fs->mkdir($nowDir . '/' . $filename); |
|
142 | + $fs->mkdir($nowDir.'/'.$filename); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | { |
220 | 220 | $str = "arrTree = new Array();\n"; |
221 | 221 | foreach ($tree as $key => $val) { |
222 | - $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['rank'] . ','; |
|
222 | + $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['rank'].','; |
|
223 | 223 | if ($val['open']) { |
224 | 224 | $str .= "true);\n"; |
225 | 225 | } else { |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | private function getFileList($app, $nowDir) |
271 | 271 | { |
272 | 272 | $topDir = $app['config']['user_data_realdir']; |
273 | - $filter = function (\SplFileInfo $file) use ($topDir) { |
|
273 | + $filter = function(\SplFileInfo $file) use ($topDir) { |
|
274 | 274 | $acceptPath = realpath($topDir); |
275 | 275 | $targetPath = $file->getRealPath(); |
276 | 276 | return (strpos($targetPath, $acceptPath) === 0); |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | /** |
378 | 378 | * フォームからの入直内容に基づいて、受注情報の再計算を行う |
379 | 379 | * |
380 | - * @param $app |
|
380 | + * @param Application $app |
|
381 | 381 | * @param $Order |
382 | 382 | */ |
383 | 383 | protected function calculate($app, \Eccube\Entity\Order $Order) |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | * - 受注ステータスが入金済に設定された場合に入金日を更新 |
472 | 472 | * |
473 | 473 | * |
474 | - * @param $app |
|
474 | + * @param Application $app |
|
475 | 475 | * @param $TargetOrder |
476 | 476 | * @param $OriginOrder |
477 | 477 | */ |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | $session->set('eccube.admin.order.customer.search', $searchData); |
334 | 334 | $session->set('eccube.admin.order.customer.search.page_no', $page_no); |
335 | 335 | } else { |
336 | - $searchData = (array)$session->get('eccube.admin.order.customer.search'); |
|
336 | + $searchData = (array) $session->get('eccube.admin.order.customer.search'); |
|
337 | 337 | if (is_null($page_no)) { |
338 | 338 | $page_no = intval($session->get('eccube.admin.order.customer.search.page_no')); |
339 | 339 | } else { |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $session->set('eccube.admin.order.product.search', $searchData); |
490 | 490 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
491 | 491 | } else { |
492 | - $searchData = (array)$session->get('eccube.admin.order.product.search'); |
|
492 | + $searchData = (array) $session->get('eccube.admin.order.product.search'); |
|
493 | 493 | if (is_null($page_no)) { |
494 | 494 | $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); |
495 | 495 | } else { |
@@ -259,6 +259,9 @@ |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | |
262 | + /** |
|
263 | + * @param Application $app |
|
264 | + */ |
|
262 | 265 | private function createBody($app, $header, $footer, $Order) |
263 | 266 | { |
264 | 267 | return $app->renderView('Mail/order.twig', array( |
@@ -336,10 +336,10 @@ |
||
336 | 336 | } |
337 | 337 | } |
338 | 338 | } else { |
339 | - $filter = function ($v) { |
|
339 | + $filter = function($v) { |
|
340 | 340 | return preg_match('/^ids\d+$/', $v); |
341 | 341 | }; |
342 | - $map = function ($v) { |
|
342 | + $map = function($v) { |
|
343 | 343 | return preg_replace('/[^\d+]/', '', $v); |
344 | 344 | }; |
345 | 345 | $keys = array_keys($request->query->all()); |
@@ -583,6 +583,8 @@ discard block |
||
583 | 583 | /** |
584 | 584 | * 登録、更新時のエラー画面表示 |
585 | 585 | * |
586 | + * @param Application $app |
|
587 | + * @param string $twig |
|
586 | 588 | */ |
587 | 589 | protected function render($app, $form, $headers, $twig) |
588 | 590 | { |
@@ -615,6 +617,7 @@ discard block |
||
615 | 617 | * アップロードされたCSVファイルの行ごとの処理 |
616 | 618 | * |
617 | 619 | * @param $formFile |
620 | + * @param Application $app |
|
618 | 621 | * @return CsvImportService |
619 | 622 | */ |
620 | 623 | protected function getImportData($app, $formFile) |
@@ -682,6 +685,8 @@ discard block |
||
682 | 685 | |
683 | 686 | /** |
684 | 687 | * 商品カテゴリの削除、登録 |
688 | + * @param Application $app |
|
689 | + * @param CsvImportService $data |
|
685 | 690 | */ |
686 | 691 | protected function createProductCategory($row, Product $Product, $app, $data) |
687 | 692 | { |
@@ -725,6 +730,8 @@ discard block |
||
725 | 730 | |
726 | 731 | /** |
727 | 732 | * 商品規格分類1、商品規格分類2がnullとなる商品規格情報を作成 |
733 | + * @param Application $app |
|
734 | + * @param CsvImportService $data |
|
728 | 735 | */ |
729 | 736 | protected function createProductClass($row, Product $Product, $app, $data, $ClassCategory1 = null, $ClassCategory2 = null) |
730 | 737 | { |
@@ -866,6 +873,8 @@ discard block |
||
866 | 873 | |
867 | 874 | /** |
868 | 875 | * 商品規格情報を更新 |
876 | + * @param Application $app |
|
877 | + * @param CsvImportService $data |
|
869 | 878 | */ |
870 | 879 | protected function updateProductClass($row, Product $Product, ProductClass $ProductClass, $app, $data) |
871 | 880 | { |
@@ -1012,6 +1021,7 @@ discard block |
||
1012 | 1021 | /** |
1013 | 1022 | * 登録、更新時のエラー画面表示 |
1014 | 1023 | * |
1024 | + * @param string $message |
|
1015 | 1025 | */ |
1016 | 1026 | protected function addErrors($message) |
1017 | 1027 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | foreach ($data as $row) { |
107 | 107 | |
108 | 108 | if ($headerSize != count($row)) { |
109 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
109 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
110 | 110 | return $this->render($app, $form, $headers, $this->productTwig); |
111 | 111 | } |
112 | 112 | |
@@ -117,33 +117,33 @@ discard block |
||
117 | 117 | if (is_numeric($row['商品ID'])) { |
118 | 118 | $Product = $app['eccube.repository.product']->find($row['商品ID']); |
119 | 119 | if (!$Product) { |
120 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
120 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
121 | 121 | return $this->render($app, $form, $headers, $this->productTwig); |
122 | 122 | } |
123 | 123 | } else { |
124 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
124 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
125 | 125 | return $this->render($app, $form, $headers, $this->productTwig); |
126 | 126 | } |
127 | 127 | |
128 | 128 | } |
129 | 129 | |
130 | 130 | if ($row['公開ステータス(ID)'] == '') { |
131 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。'); |
|
131 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。'); |
|
132 | 132 | } else { |
133 | 133 | if (is_numeric($row['公開ステータス(ID)'])) { |
134 | 134 | $Disp = $app['eccube.repository.master.disp']->find($row['公開ステータス(ID)']); |
135 | 135 | if (!$Disp) { |
136 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
136 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
137 | 137 | } else { |
138 | 138 | $Product->setStatus($Disp); |
139 | 139 | } |
140 | 140 | } else { |
141 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
141 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | 145 | if (Str::isBlank($row['商品名'])) { |
146 | - $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。'); |
|
146 | + $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。'); |
|
147 | 147 | return $this->render($app, $form, $headers, $this->productTwig); |
148 | 148 | } else { |
149 | 149 | $Product->setName(Str::trimAll($row['商品名'])); |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | if ($row['商品削除フラグ'] == '') { |
183 | 183 | $Product->setDelFlg(Constant::DISABLED); |
184 | 184 | } else { |
185 | - if ($row['商品削除フラグ'] == (string)Constant::DISABLED || $row['商品削除フラグ'] == (string)Constant::ENABLED) { |
|
185 | + if ($row['商品削除フラグ'] == (string) Constant::DISABLED || $row['商品削除フラグ'] == (string) Constant::ENABLED) { |
|
186 | 186 | $Product->setDelFlg($row['商品削除フラグ']); |
187 | 187 | } else { |
188 | - $this->addErrors(($data->key() + 1) . '行目の商品削除フラグが設定されていません。'); |
|
188 | + $this->addErrors(($data->key() + 1).'行目の商品削除フラグが設定されていません。'); |
|
189 | 189 | return $this->render($app, $form, $headers, $this->productTwig); |
190 | 190 | } |
191 | 191 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
213 | 213 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
214 | 214 | } else { |
215 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
215 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
216 | 216 | } |
217 | 217 | } |
218 | 218 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | if ($row['規格分類1(ID)'] != '') { |
221 | 221 | |
222 | 222 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
223 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
223 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
224 | 224 | } else { |
225 | 225 | // 商品規格あり |
226 | 226 | // 企画分類あり商品を作成 |
@@ -235,30 +235,30 @@ discard block |
||
235 | 235 | if (is_numeric($row['規格分類1(ID)'])) { |
236 | 236 | $ClassCategory1 = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
237 | 237 | if (!$ClassCategory1) { |
238 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
238 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
239 | 239 | } else { |
240 | 240 | $ProductClass->setClassCategory1($ClassCategory1); |
241 | 241 | } |
242 | 242 | } else { |
243 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
243 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | if ($row['規格分類2(ID)'] != '') { |
247 | 247 | if (is_numeric($row['規格分類2(ID)'])) { |
248 | 248 | $ClassCategory2 = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
249 | 249 | if (!$ClassCategory2) { |
250 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
250 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
251 | 251 | } else { |
252 | 252 | if ($ClassCategory1 && |
253 | 253 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
254 | 254 | ) { |
255 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
255 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
256 | 256 | } else { |
257 | 257 | $ProductClass->setClassCategory2($ClassCategory2); |
258 | 258 | } |
259 | 259 | } |
260 | 260 | } else { |
261 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
261 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | $ProductClass->setProductStock($ProductStock); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | } else { |
272 | 272 | if ($row['規格分類2(ID)'] != '') { |
273 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
273 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
299 | 299 | $pc->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 | } |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
323 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
323 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
324 | 324 | } else { |
325 | 325 | |
326 | 326 | // 必ず規格分類1がセットされている |
@@ -329,36 +329,36 @@ discard block |
||
329 | 329 | if (is_numeric($classCategoryId1)) { |
330 | 330 | $ClassCategory1 = $app['eccube.repository.class_category']->find($classCategoryId1); |
331 | 331 | if (!$ClassCategory1) { |
332 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
332 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
333 | 333 | } |
334 | 334 | } else { |
335 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
335 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | $ClassCategory2 = null; |
339 | 339 | if ($row['規格分類2(ID)'] != '') { |
340 | 340 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
341 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
341 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
342 | 342 | } else { |
343 | 343 | if (is_numeric($classCategoryId2)) { |
344 | 344 | $ClassCategory2 = $app['eccube.repository.class_category']->find($classCategoryId2); |
345 | 345 | if (!$ClassCategory2) { |
346 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
346 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
347 | 347 | } else { |
348 | 348 | if ($ClassCategory1 && |
349 | 349 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
350 | 350 | ) { |
351 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
351 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | } else { |
355 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
355 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | } |
359 | 359 | } else { |
360 | 360 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
361 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
361 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
370 | 370 | $ProductClass->setDeliveryFee($deliveryFee); |
371 | 371 | } else { |
372 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
372 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
373 | 373 | } |
374 | 374 | } |
375 | 375 | } |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | foreach ($data as $row) { |
453 | 453 | |
454 | 454 | if ($headerSize != count($row)) { |
455 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
455 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
456 | 456 | return $this->render($app, $form, $headers, $this->categoryTwig); |
457 | 457 | } |
458 | 458 | |
@@ -460,23 +460,23 @@ discard block |
||
460 | 460 | $Category = new Category(); |
461 | 461 | } else { |
462 | 462 | if (!is_numeric($row['カテゴリID'])) { |
463 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
463 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
464 | 464 | return $this->render($app, $form, $headers, $this->categoryTwig); |
465 | 465 | } |
466 | 466 | $Category = $app['eccube.repository.category']->find($row['カテゴリID']); |
467 | 467 | if (!$Category) { |
468 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
468 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
469 | 469 | return $this->render($app, $form, $headers, $this->categoryTwig); |
470 | 470 | } |
471 | 471 | if ($row['カテゴリID'] == $row['親カテゴリID']) { |
472 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
472 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
473 | 473 | return $this->render($app, $form, $headers, $this->categoryTwig); |
474 | 474 | } |
475 | 475 | |
476 | 476 | } |
477 | 477 | |
478 | 478 | if (Str::isBlank($row['カテゴリ名'])) { |
479 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。'); |
|
479 | + $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。'); |
|
480 | 480 | return $this->render($app, $form, $headers, $this->categoryTwig); |
481 | 481 | } else { |
482 | 482 | $Category->setName(Str::trimAll($row['カテゴリ名'])); |
@@ -485,13 +485,13 @@ discard block |
||
485 | 485 | if ($row['親カテゴリID'] != '') { |
486 | 486 | |
487 | 487 | if (!is_numeric($row['親カテゴリID'])) { |
488 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
488 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
489 | 489 | return $this->render($app, $form, $headers, $this->categoryTwig); |
490 | 490 | } |
491 | 491 | |
492 | 492 | $ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']); |
493 | 493 | if (!$ParentCategory) { |
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 | |
@@ -507,14 +507,14 @@ discard block |
||
507 | 507 | } |
508 | 508 | |
509 | 509 | if ($app['config']['category_nest_level'] < $Category->getLevel()) { |
510 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
510 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
511 | 511 | return $this->render($app, $form, $headers, $this->categoryTwig); |
512 | 512 | } |
513 | 513 | |
514 | 514 | $status = $app['eccube.repository.category']->save($Category); |
515 | 515 | |
516 | 516 | if (!$status) { |
517 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが設定できません。'); |
|
517 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが設定できません。'); |
|
518 | 518 | } |
519 | 519 | |
520 | 520 | if ($this->hasErrors()) { |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | throw new NotFoundHttpException(); |
558 | 558 | } |
559 | 559 | |
560 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
560 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
561 | 561 | |
562 | 562 | // ヘッダ行の出力 |
563 | 563 | $row = array(); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | }); |
573 | 573 | |
574 | 574 | $response->headers->set('Content-Type', 'application/octet-stream'); |
575 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
575 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
576 | 576 | $response->send(); |
577 | 577 | |
578 | 578 | return $response; |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | if (!empty($this->fileName)) { |
596 | 596 | try { |
597 | 597 | $fs = new Filesystem(); |
598 | - $fs->remove($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
598 | + $fs->remove($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
599 | 599 | } catch (\Exception $e) { |
600 | 600 | // エラーが発生しても無視する |
601 | 601 | } |
@@ -618,10 +618,10 @@ discard block |
||
618 | 618 | protected function getImportData($app, $formFile) |
619 | 619 | { |
620 | 620 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
621 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
621 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
622 | 622 | $formFile->move($app['config']['csv_temp_realdir'], $this->fileName); |
623 | 623 | |
624 | - $file = file_get_contents($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
624 | + $file = file_get_contents($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
625 | 625 | // アップロードされたファイルがUTF-8以外は文字コード変換を行う |
626 | 626 | $encode = Str::characterEncoding(substr($file, 0, 6)); |
627 | 627 | if ($encode != 'UTF-8') { |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | } |
764 | 764 | } |
765 | 765 | if (!$Tag) { |
766 | - $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。'); |
|
766 | + $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。'); |
|
767 | 767 | } |
768 | 768 | } |
769 | 769 | } |
@@ -781,17 +781,17 @@ discard block |
||
781 | 781 | |
782 | 782 | |
783 | 783 | if ($row['商品種別(ID)'] == '') { |
784 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
784 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
785 | 785 | } else { |
786 | 786 | if (is_numeric($row['商品種別(ID)'])) { |
787 | 787 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
788 | 788 | if (!$ProductType) { |
789 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
789 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
790 | 790 | } else { |
791 | 791 | $ProductClass->setProductType($ProductType); |
792 | 792 | } |
793 | 793 | } else { |
794 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
794 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
795 | 795 | } |
796 | 796 | } |
797 | 797 | |
@@ -802,12 +802,12 @@ discard block |
||
802 | 802 | if (is_numeric($row['発送日目安(ID)'])) { |
803 | 803 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
804 | 804 | if (!$DeliveryDate) { |
805 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
805 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
806 | 806 | } else { |
807 | 807 | $ProductClass->setDeliveryDate($DeliveryDate); |
808 | 808 | } |
809 | 809 | } else { |
810 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
810 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
811 | 811 | } |
812 | 812 | } |
813 | 813 | |
@@ -818,19 +818,19 @@ discard block |
||
818 | 818 | } |
819 | 819 | |
820 | 820 | if ($row['在庫数無制限フラグ'] == '') { |
821 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
821 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
822 | 822 | } else { |
823 | 823 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
824 | 824 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
825 | 825 | // 在庫数が設定されていなければエラー |
826 | 826 | if ($row['在庫数'] == '') { |
827 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
827 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
828 | 828 | } else { |
829 | 829 | $stock = str_replace(',', '', $row['在庫数']); |
830 | 830 | if (is_numeric($stock) && $stock >= 0) { |
831 | 831 | $ProductClass->setStock($stock); |
832 | 832 | } else { |
833 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
833 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
834 | 834 | } |
835 | 835 | } |
836 | 836 | |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
839 | 839 | $ProductClass->setStock(null); |
840 | 840 | } else { |
841 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
841 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
842 | 842 | } |
843 | 843 | } |
844 | 844 | |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
848 | 848 | $ProductClass->setSaleLimit($saleLimit); |
849 | 849 | } else { |
850 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
850 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
851 | 851 | } |
852 | 852 | } |
853 | 853 | |
@@ -856,18 +856,18 @@ discard block |
||
856 | 856 | if (is_numeric($price01) && $price01 >= 0) { |
857 | 857 | $ProductClass->setPrice01($price01); |
858 | 858 | } else { |
859 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
859 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
860 | 860 | } |
861 | 861 | } |
862 | 862 | |
863 | 863 | if ($row['販売価格'] == '') { |
864 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
864 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
865 | 865 | } else { |
866 | 866 | $price02 = str_replace(',', '', $row['販売価格']); |
867 | 867 | if (is_numeric($price02) && $price02 >= 0) { |
868 | 868 | $ProductClass->setPrice02($price02); |
869 | 869 | } else { |
870 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
870 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
871 | 871 | } |
872 | 872 | } |
873 | 873 | |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | if (is_numeric($delivery_fee) && $delivery_fee >= 0) { |
877 | 877 | $ProductClass->setDeliveryFee($delivery_fee); |
878 | 878 | } else { |
879 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
879 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
880 | 880 | } |
881 | 881 | } |
882 | 882 | |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
887 | 887 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
888 | 888 | } else { |
889 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
889 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
890 | 890 | } |
891 | 891 | } |
892 | 892 | |
@@ -919,17 +919,17 @@ discard block |
||
919 | 919 | $ProductClass->setProduct($Product); |
920 | 920 | |
921 | 921 | if ($row['商品種別(ID)'] == '') { |
922 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
922 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
923 | 923 | } else { |
924 | 924 | if (is_numeric($row['商品種別(ID)'])) { |
925 | 925 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
926 | 926 | if (!$ProductType) { |
927 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
927 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
928 | 928 | } else { |
929 | 929 | $ProductClass->setProductType($ProductType); |
930 | 930 | } |
931 | 931 | } else { |
932 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
932 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
933 | 933 | } |
934 | 934 | } |
935 | 935 | |
@@ -938,12 +938,12 @@ discard block |
||
938 | 938 | if (is_numeric($row['規格分類1(ID)'])) { |
939 | 939 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
940 | 940 | if (!$ClassCategory) { |
941 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
941 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
942 | 942 | } else { |
943 | 943 | $ProductClass->setClassCategory1($ClassCategory); |
944 | 944 | } |
945 | 945 | } else { |
946 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
946 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
947 | 947 | } |
948 | 948 | } |
949 | 949 | |
@@ -951,12 +951,12 @@ discard block |
||
951 | 951 | if (is_numeric($row['規格分類2(ID)'])) { |
952 | 952 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
953 | 953 | if (!$ClassCategory) { |
954 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
954 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
955 | 955 | } else { |
956 | 956 | $ProductClass->setClassCategory2($ClassCategory); |
957 | 957 | } |
958 | 958 | } else { |
959 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
959 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
960 | 960 | } |
961 | 961 | } |
962 | 962 | |
@@ -964,12 +964,12 @@ discard block |
||
964 | 964 | if (is_numeric($row['発送日目安(ID)'])) { |
965 | 965 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
966 | 966 | if (!$DeliveryDate) { |
967 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
967 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
968 | 968 | } else { |
969 | 969 | $ProductClass->setDeliveryDate($DeliveryDate); |
970 | 970 | } |
971 | 971 | } else { |
972 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
972 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
973 | 973 | } |
974 | 974 | } |
975 | 975 | |
@@ -980,19 +980,19 @@ discard block |
||
980 | 980 | } |
981 | 981 | |
982 | 982 | if ($row['在庫数無制限フラグ'] == '') { |
983 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
983 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
984 | 984 | } else { |
985 | 985 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
986 | 986 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
987 | 987 | // 在庫数が設定されていなければエラー |
988 | 988 | if ($row['在庫数'] == '') { |
989 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
989 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
990 | 990 | } else { |
991 | 991 | $stock = str_replace(',', '', $row['在庫数']); |
992 | 992 | if (is_numeric($stock) && $stock >= 0) { |
993 | 993 | $ProductClass->setStock($row['在庫数']); |
994 | 994 | } else { |
995 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
995 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
996 | 996 | } |
997 | 997 | } |
998 | 998 | |
@@ -1000,7 +1000,7 @@ discard block |
||
1000 | 1000 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
1001 | 1001 | $ProductClass->setStock(null); |
1002 | 1002 | } else { |
1003 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1003 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1004 | 1004 | } |
1005 | 1005 | } |
1006 | 1006 | |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
1010 | 1010 | $ProductClass->setSaleLimit($saleLimit); |
1011 | 1011 | } else { |
1012 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
1012 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
1013 | 1013 | } |
1014 | 1014 | } |
1015 | 1015 | |
@@ -1018,18 +1018,18 @@ discard block |
||
1018 | 1018 | if (is_numeric($price01) && $price01 >= 0) { |
1019 | 1019 | $ProductClass->setPrice01($price01); |
1020 | 1020 | } else { |
1021 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
1021 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
1022 | 1022 | } |
1023 | 1023 | } |
1024 | 1024 | |
1025 | 1025 | if ($row['販売価格'] == '') { |
1026 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
1026 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
1027 | 1027 | } else { |
1028 | 1028 | $price02 = str_replace(',', '', $row['販売価格']); |
1029 | 1029 | if (is_numeric($price02) && $price02 >= 0) { |
1030 | 1030 | $ProductClass->setPrice02($price02); |
1031 | 1031 | } else { |
1032 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
1032 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
1033 | 1033 | } |
1034 | 1034 | } |
1035 | 1035 | |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
1040 | 1040 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
1041 | 1041 | } else { |
1042 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
1042 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
1043 | 1043 | } |
1044 | 1044 | } |
1045 | 1045 |
@@ -28,7 +28,6 @@ |
||
28 | 28 | use Eccube\Entity\Master\DeviceType; |
29 | 29 | use Eccube\Util\Str; |
30 | 30 | use Symfony\Component\Filesystem\Filesystem; |
31 | -use Symfony\Component\Finder\Finder; |
|
32 | 31 | use Symfony\Component\Form\FormError; |
33 | 32 | use Symfony\Component\HttpFoundation\Request; |
34 | 33 | use Symfony\Component\HttpFoundation\Response; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $config['template_realdir'] = $config['root_dir'].'/app/template/'.$templateCode; |
78 | 78 | $config['template_html_realdir'] = $config['public_path_realdir'].'/template/'.$templateCode; |
79 | 79 | $config['front_urlpath'] = $config['root_urlpath'].'/template/'.$templateCode; |
80 | - $config['block_realdir'] =$config['template_realdir'].'/Block'; |
|
80 | + $config['block_realdir'] = $config['template_realdir'].'/Block'; |
|
81 | 81 | |
82 | 82 | if (file_exists($file.'.php')) { |
83 | 83 | file_put_contents($file.'.php', sprintf('<?php return %s', var_export($config, true)).';'); |
@@ -117,19 +117,19 @@ discard block |
||
117 | 117 | // 該当テンプレートのディレクトリ |
118 | 118 | $config = $app['config']; |
119 | 119 | $templateCode = $Template->getCode(); |
120 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
121 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
120 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
121 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
122 | 122 | |
123 | 123 | // 一時ディレクトリ |
124 | 124 | $uniqId = sha1(Str::random(32)); |
125 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
126 | - $appDir = $tmpDir . '/app'; |
|
127 | - $htmlDir = $tmpDir . '/html'; |
|
125 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
126 | + $appDir = $tmpDir.'/app'; |
|
127 | + $htmlDir = $tmpDir.'/html'; |
|
128 | 128 | |
129 | 129 | // ファイル名 |
130 | - $tarFile = $config['template_temp_realdir'] . '/' . $uniqId . '.tar'; |
|
131 | - $tarGzFile = $tarFile . '.gz'; |
|
132 | - $downloadFileName = $Template->getCode() . '.tar.gz'; |
|
130 | + $tarFile = $config['template_temp_realdir'].'/'.$uniqId.'.tar'; |
|
131 | + $tarGzFile = $tarFile.'.gz'; |
|
132 | + $downloadFileName = $Template->getCode().'.tar.gz'; |
|
133 | 133 | |
134 | 134 | // 該当テンプレートを一時ディレクトリへコピーする. |
135 | 135 | $fs = new Filesystem(); |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | |
150 | 150 | // ダウンロード完了後にファイルを削除する. |
151 | 151 | // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony |
152 | - $app->finish(function (Request $request, Response $response, \Silex\Application $app) use ( |
|
152 | + $app->finish(function(Request $request, Response $response, \Silex\Application $app) use ( |
|
153 | 153 | $tmpDir, |
154 | 154 | $tarFile, |
155 | 155 | $tarGzFile |
156 | 156 | ) { |
157 | - $app['monolog']->addDebug('remove temp file: ' . $tmpDir); |
|
158 | - $app['monolog']->addDebug('remove temp file: ' . $tarFile); |
|
159 | - $app['monolog']->addDebug('remove temp file: ' . $tarGzFile); |
|
157 | + $app['monolog']->addDebug('remove temp file: '.$tmpDir); |
|
158 | + $app['monolog']->addDebug('remove temp file: '.$tarFile); |
|
159 | + $app['monolog']->addDebug('remove temp file: '.$tarGzFile); |
|
160 | 160 | $fs = new Filesystem(); |
161 | 161 | $fs->remove($tmpDir); |
162 | 162 | $fs->remove($tarFile); |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | // テンプレートディレクトリの削除 |
198 | 198 | $config = $app['config']; |
199 | 199 | $templateCode = $Template->getCode(); |
200 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
201 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
200 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
201 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
202 | 202 | |
203 | 203 | $fs = new Filesystem(); |
204 | 204 | $fs->remove($targetRealDir); |
@@ -241,18 +241,18 @@ discard block |
||
241 | 241 | // 該当テンプレートのディレクトリ |
242 | 242 | $config = $app['config']; |
243 | 243 | $templateCode = $Template->getCode(); |
244 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
245 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
244 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
245 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
246 | 246 | |
247 | 247 | // 一時ディレクトリ |
248 | 248 | $uniqId = sha1(Str::random(32)); |
249 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
250 | - $appDir = $tmpDir . '/app'; |
|
251 | - $htmlDir = $tmpDir . '/html'; |
|
249 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
250 | + $appDir = $tmpDir.'/app'; |
|
251 | + $htmlDir = $tmpDir.'/html'; |
|
252 | 252 | |
253 | 253 | $formFile = $form['file']->getData(); |
254 | 254 | // ファイル名 |
255 | - $archive = $templateCode . '.' . $formFile->getClientOriginalExtension(); |
|
255 | + $archive = $templateCode.'.'.$formFile->getClientOriginalExtension(); |
|
256 | 256 | |
257 | 257 | // ファイルを一時ディレクトリへ移動. |
258 | 258 | $formFile->move($tmpDir, $archive); |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | try { |
262 | 262 | if ($formFile->getClientOriginalExtension() == 'zip') { |
263 | 263 | $zip = new \ZipArchive(); |
264 | - $zip->open($tmpDir . '/' . $archive); |
|
264 | + $zip->open($tmpDir.'/'.$archive); |
|
265 | 265 | $zip->extractTo($tmpDir); |
266 | 266 | $zip->close(); |
267 | 267 | } else { |
268 | - $phar = new \PharData($tmpDir . '/' . $archive); |
|
268 | + $phar = new \PharData($tmpDir.'/'.$archive); |
|
269 | 269 | $phar->extractTo($tmpDir, null, true); |
270 | 270 | } |
271 | 271 | } catch (\Exception $e) { |
@@ -250,6 +250,9 @@ |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | |
253 | + /** |
|
254 | + * @param InstallApplication $app |
|
255 | + */ |
|
253 | 256 | private function checkModules($app) |
254 | 257 | { |
255 | 258 | foreach ($this->required_modules as $module) { |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | |
61 | 61 | public function __construct() |
62 | 62 | { |
63 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
64 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
65 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
63 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
64 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
65 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | private function isValid(Request $request, Form $form) |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | return $app['twig']->render('step1.twig', array( |
114 | 114 | 'form' => $form->createView(), |
115 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
115 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
116 | 116 | )); |
117 | 117 | } |
118 | 118 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | return $app['twig']->render('step2.twig', array( |
137 | 137 | 'protectedDirs' => $protectedDirs, |
138 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
138 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
139 | 139 | )); |
140 | 140 | } |
141 | 141 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | if (empty($sessionData['shop_name'])) { |
151 | 151 | |
152 | - $config_file = $this->config_path . '/config.yml'; |
|
152 | + $config_file = $this->config_path.'/config.yml'; |
|
153 | 153 | $fs = new Filesystem(); |
154 | 154 | |
155 | 155 | if ($fs->exists($config_file)) { |
@@ -163,21 +163,21 @@ discard block |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | // セキュリティの設定 |
166 | - $config_file = $this->config_path . '/path.yml'; |
|
166 | + $config_file = $this->config_path.'/path.yml'; |
|
167 | 167 | $config = Yaml::parse(file_get_contents($config_file)); |
168 | 168 | $sessionData['admin_dir'] = $config['admin_route']; |
169 | 169 | |
170 | - $config_file = $this->config_path . '/config.yml'; |
|
170 | + $config_file = $this->config_path.'/config.yml'; |
|
171 | 171 | $config = Yaml::parse(file_get_contents($config_file)); |
172 | 172 | |
173 | 173 | $allowHost = $config['admin_allow_host']; |
174 | 174 | if (count($allowHost) > 0) { |
175 | 175 | $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost)); |
176 | 176 | } |
177 | - $sessionData['admin_force_ssl'] = (bool)$config['force_ssl']; |
|
177 | + $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
|
178 | 178 | |
179 | 179 | // メール設定 |
180 | - $config_file = $this->config_path . '/mail.yml'; |
|
180 | + $config_file = $this->config_path.'/mail.yml'; |
|
181 | 181 | $config = Yaml::parse(file_get_contents($config_file)); |
182 | 182 | $mail = $config['mail']; |
183 | 183 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | return $app['twig']->render('step3.twig', array( |
202 | 202 | 'form' => $form->createView(), |
203 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
203 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
204 | 204 | )); |
205 | 205 | } |
206 | 206 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | return $app['twig']->render('step4.twig', array( |
246 | 246 | 'form' => $form->createView(), |
247 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
247 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
248 | 248 | )); |
249 | 249 | } |
250 | 250 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $host = $request->getSchemeAndHttpHost(); |
292 | 292 | $basePath = $request->getBasePath(); |
293 | 293 | $params = array( |
294 | - 'http_url' => $host . $basePath, |
|
294 | + 'http_url' => $host.$basePath, |
|
295 | 295 | 'shop_name' => $sessionData['shop_name'], |
296 | 296 | ); |
297 | 297 | |
@@ -306,24 +306,24 @@ discard block |
||
306 | 306 | |
307 | 307 | return $app['twig']->render('step5.twig', array( |
308 | 308 | 'form' => $form->createView(), |
309 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
309 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
310 | 310 | )); |
311 | 311 | } |
312 | 312 | |
313 | 313 | // インストール完了 |
314 | 314 | public function complete(InstallApplication $app, Request $request) |
315 | 315 | { |
316 | - $config_file = $this->config_path . '/path.yml'; |
|
316 | + $config_file = $this->config_path.'/path.yml'; |
|
317 | 317 | $config = Yaml::parse(file_get_contents($config_file)); |
318 | 318 | |
319 | 319 | $host = $request->getSchemeAndHttpHost(); |
320 | 320 | $basePath = $request->getBasePath(); |
321 | 321 | |
322 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
322 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
323 | 323 | |
324 | 324 | return $app['twig']->render('complete.twig', array( |
325 | 325 | 'admin_url' => $adminUrl, |
326 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
326 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
327 | 327 | )); |
328 | 328 | } |
329 | 329 | |
@@ -340,17 +340,17 @@ discard block |
||
340 | 340 | { |
341 | 341 | foreach ($this->required_modules as $module) { |
342 | 342 | if (!extension_loaded($module)) { |
343 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
343 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
344 | 344 | } |
345 | 345 | } |
346 | 346 | |
347 | 347 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
348 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
348 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | foreach ($this->recommended_module as $module) { |
352 | 352 | if (!extension_loaded($module)) { |
353 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
353 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
354 | 354 | } |
355 | 355 | } |
356 | 356 | |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | if (!function_exists('apache_get_modules')) { |
369 | 369 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
370 | 370 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
371 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
371 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
372 | 372 | } |
373 | 373 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
374 | 374 | // iis |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | private function setPDO() |
381 | 381 | { |
382 | - $config_file = $this->config_path . '/database.yml'; |
|
382 | + $config_file = $this->config_path.'/database.yml'; |
|
383 | 383 | $config = Yaml::parse(file_get_contents($config_file)); |
384 | 384 | |
385 | 385 | try { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | private function getEntityManager() |
416 | 416 | { |
417 | - $config_file = $this->config_path . '/database.yml'; |
|
417 | + $config_file = $this->config_path.'/database.yml'; |
|
418 | 418 | $database = Yaml::parse(file_get_contents($config_file)); |
419 | 419 | |
420 | 420 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -422,15 +422,15 @@ discard block |
||
422 | 422 | )); |
423 | 423 | |
424 | 424 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
425 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
425 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
426 | 426 | 'orm.em.options' => array( |
427 | 427 | 'mappings' => array( |
428 | 428 | array( |
429 | 429 | 'type' => 'yml', |
430 | 430 | 'namespace' => 'Eccube\Entity', |
431 | 431 | 'path' => array( |
432 | - __DIR__ . '/../../Resource/doctrine', |
|
433 | - __DIR__ . '/../../Resource/doctrine/master', |
|
432 | + __DIR__.'/../../Resource/doctrine', |
|
433 | + __DIR__.'/../../Resource/doctrine/master', |
|
434 | 434 | ), |
435 | 435 | ), |
436 | 436 | |
@@ -458,11 +458,11 @@ discard block |
||
458 | 458 | { |
459 | 459 | $this->resetNatTimer(); |
460 | 460 | |
461 | - $config_file = $this->config_path . '/database.yml'; |
|
461 | + $config_file = $this->config_path.'/database.yml'; |
|
462 | 462 | $database = Yaml::parse(file_get_contents($config_file)); |
463 | 463 | $config['database'] = $database['database']; |
464 | 464 | |
465 | - $config_file = $this->config_path . '/config.yml'; |
|
465 | + $config_file = $this->config_path.'/config.yml'; |
|
466 | 466 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
467 | 467 | $config['config'] = $baseConfig; |
468 | 468 | |
@@ -518,11 +518,11 @@ discard block |
||
518 | 518 | { |
519 | 519 | $this->resetNatTimer(); |
520 | 520 | |
521 | - $config_file = $this->config_path . '/database.yml'; |
|
521 | + $config_file = $this->config_path.'/database.yml'; |
|
522 | 522 | $database = Yaml::parse(file_get_contents($config_file)); |
523 | 523 | $config['database'] = $database['database']; |
524 | 524 | |
525 | - $config_file = $this->config_path . '/config.yml'; |
|
525 | + $config_file = $this->config_path.'/config.yml'; |
|
526 | 526 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
527 | 527 | $config['config'] = $baseConfig; |
528 | 528 | |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | $config = new Configuration($app['db']); |
588 | 588 | $config->setMigrationsNamespace('DoctrineMigrations'); |
589 | 589 | |
590 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
590 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
591 | 591 | $config->setMigrationsDirectory($migrationDir); |
592 | 592 | $config->registerMigrationsFromDirectory($migrationDir); |
593 | 593 | |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | private function getProtectedDirs() |
619 | 619 | { |
620 | 620 | $protectedDirs = array(); |
621 | - $base = __DIR__ . '/../../../..'; |
|
621 | + $base = __DIR__.'/../../../..'; |
|
622 | 622 | $dirs = array( |
623 | 623 | '/html', |
624 | 624 | '/app', |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | ); |
632 | 632 | |
633 | 633 | foreach ($dirs as $dir) { |
634 | - if (!is_writable($base . $dir)) { |
|
634 | + if (!is_writable($base.$dir)) { |
|
635 | 635 | $protectedDirs[] = $dir; |
636 | 636 | } |
637 | 637 | } |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | private function createConfigYamlFile($data, $auth = true) |
643 | 643 | { |
644 | 644 | $fs = new Filesystem(); |
645 | - $config_file = $this->config_path . '/config.yml'; |
|
645 | + $config_file = $this->config_path.'/config.yml'; |
|
646 | 646 | |
647 | 647 | if ($fs->exists($config_file)) { |
648 | 648 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | $content = str_replace( |
674 | 674 | $target, |
675 | 675 | $replace, |
676 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
676 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
677 | 677 | ); |
678 | 678 | $fs->dumpFile($config_file, $content); |
679 | 679 | |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | |
688 | 688 | private function addInstallStatus() |
689 | 689 | { |
690 | - $config_file = $this->config_path . '/config.yml'; |
|
690 | + $config_file = $this->config_path.'/config.yml'; |
|
691 | 691 | $config = Yaml::parse(file_get_contents($config_file)); |
692 | 692 | $config['eccube_install'] = 1; |
693 | 693 | $yml = Yaml::dump($config); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | private function createDatabaseYamlFile($data) |
700 | 700 | { |
701 | 701 | $fs = new Filesystem(); |
702 | - $config_file = $this->config_path . '/database.yml'; |
|
702 | + $config_file = $this->config_path.'/database.yml'; |
|
703 | 703 | if ($fs->exists($config_file)) { |
704 | 704 | $fs->remove($config_file); |
705 | 705 | } |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $content = str_replace( |
734 | 734 | $target, |
735 | 735 | $replace, |
736 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
736 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
737 | 737 | ); |
738 | 738 | |
739 | 739 | } else { |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | private function createMailYamlFile($data) |
755 | 755 | { |
756 | 756 | $fs = new Filesystem(); |
757 | - $config_file = $this->config_path . '/mail.yml'; |
|
757 | + $config_file = $this->config_path.'/mail.yml'; |
|
758 | 758 | if ($fs->exists($config_file)) { |
759 | 759 | $fs->remove($config_file); |
760 | 760 | } |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | $content = str_replace( |
772 | 772 | $target, |
773 | 773 | $replace, |
774 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
774 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
775 | 775 | ); |
776 | 776 | $fs->dumpFile($config_file, $content); |
777 | 777 | |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | private function createPathYamlFile($data, Request $request) |
782 | 782 | { |
783 | 783 | $fs = new Filesystem(); |
784 | - $config_file = $this->config_path . '/path.yml'; |
|
784 | + $config_file = $this->config_path.'/path.yml'; |
|
785 | 785 | if ($fs->exists($config_file)) { |
786 | 786 | $fs->remove($config_file); |
787 | 787 | } |
@@ -789,9 +789,9 @@ discard block |
||
789 | 789 | $ADMIN_ROUTE = $data['admin_dir']; |
790 | 790 | $TEMPLATE_CODE = 'default'; |
791 | 791 | $USER_DATA_ROUTE = 'user_data'; |
792 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
792 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
793 | 793 | $ROOT_URLPATH = $request->getBasePath(); |
794 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
794 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
795 | 795 | |
796 | 796 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
797 | 797 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | $content = str_replace( |
801 | 801 | $target, |
802 | 802 | $replace, |
803 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
803 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
804 | 804 | ); |
805 | 805 | $fs->dumpFile($config_file, $content); |
806 | 806 | |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | |
810 | 810 | private function sendAppData($params) |
811 | 811 | { |
812 | - $config_file = $this->config_path . '/database.yml'; |
|
812 | + $config_file = $this->config_path.'/database.yml'; |
|
813 | 813 | $db_config = Yaml::parse(file_get_contents($config_file)); |
814 | 814 | |
815 | 815 | $this->setPDO(); |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | } |
822 | 822 | |
823 | 823 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
824 | - $db_ver = 'MySQL:' . $version; |
|
824 | + $db_ver = 'MySQL:'.$version; |
|
825 | 825 | } else { |
826 | 826 | $db_ver = $version; |
827 | 827 | } |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | |
840 | 840 | $header = array( |
841 | 841 | 'Content-Type: application/x-www-form-urlencoded', |
842 | - 'Content-Length: ' . strlen($data), |
|
842 | + 'Content-Length: '.strlen($data), |
|
843 | 843 | ); |
844 | 844 | $context = stream_context_create( |
845 | 845 | array( |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | public function migration(InstallApplication $app, Request $request) |
868 | 868 | { |
869 | 869 | return $app['twig']->render('migration.twig', array( |
870 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
870 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
871 | 871 | )); |
872 | 872 | } |
873 | 873 | |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | return $app['twig']->render('migration_plugin.twig', array( |
897 | 897 | 'Plugins' => $Plugins, |
898 | 898 | 'version' => Constant::VERSION, |
899 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
899 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
900 | 900 | )); |
901 | 901 | } |
902 | 902 | } |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | \Eccube\Util\Cache::clear($config_app, true); |
920 | 920 | |
921 | 921 | return $app['twig']->render('migration_end.twig', array( |
922 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
922 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
923 | 923 | )); |
924 | 924 | } |
925 | 925 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | /** |
131 | 131 | * @param \Eccube\Entity\Member $Member |
132 | 132 | * |
133 | - * @return void |
|
133 | + * @return boolean |
|
134 | 134 | */ |
135 | 135 | public function up(\Eccube\Entity\Member $Member) |
136 | 136 | { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * @param int|null|\Eccube\Entity\ProductClass $ProductClass 商品規格 |
66 | 66 | * @param int|null|\Eccube\Entity\Master\Pref $Pref 都道府県 |
67 | 67 | * @param int|null|\Eccube\Entity\Master\Country $Country 国 |
68 | - * @return \Eccube\Entity\TaxRule 税設定情報 |
|
68 | + * @return integer 税設定情報 |
|
69 | 69 | * |
70 | 70 | * @throws NoResultException |
71 | 71 | */ |
@@ -201,7 +201,7 @@ |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
204 | - * @param \Eccube\Entity\ProductClass|integer $ProductClass |
|
204 | + * @param string $ProductClass |
|
205 | 205 | * @param integer $quantity |
206 | 206 | * @return \Eccube\Service\CartService |
207 | 207 | * @throws CartException |