@@ -198,6 +198,9 @@ discard block |
||
198 | 198 | return $orderArray; |
199 | 199 | } |
200 | 200 | |
201 | + /** |
|
202 | + * @param \DateTime $dateTime |
|
203 | + */ |
|
201 | 204 | protected function getSalesByMonth($em, $dateTime, array $excludes) |
202 | 205 | { |
203 | 206 | // concat... for pgsql |
@@ -229,6 +232,9 @@ discard block |
||
229 | 232 | return $result; |
230 | 233 | } |
231 | 234 | |
235 | + /** |
|
236 | + * @param \DateTime $dateTime |
|
237 | + */ |
|
232 | 238 | protected function getSalesByDay($em, $dateTime, array $excludes) |
233 | 239 | { |
234 | 240 | // concat... for pgsql |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | // install.phpのチェック. |
57 | 57 | if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) { |
58 | - $file = $app['config']['root_dir'] . '/html/install.php'; |
|
58 | + $file = $app['config']['root_dir'].'/html/install.php'; |
|
59 | 59 | if (file_exists($file)) { |
60 | 60 | $app->addWarning('admin.install.warning', 'admin'); |
61 | 61 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | t1.status |
185 | 185 | ORDER BY |
186 | 186 | t1.status'; |
187 | - $rsm = new ResultSetMapping();; |
|
187 | + $rsm = new ResultSetMapping(); ; |
|
188 | 188 | $rsm->addScalarResult('status', 'status'); |
189 | 189 | $rsm->addScalarResult('count', 'count'); |
190 | 190 | $query = $em->createNativeQuery($sql, $rsm); |
@@ -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 | */ |
@@ -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( |
@@ -247,7 +247,7 @@ |
||
247 | 247 | } |
248 | 248 | } else { |
249 | 249 | foreach ($_GET as $key => $value) { |
250 | - $ids = str_replace('ids', '', $key) . ',' . $ids; |
|
250 | + $ids = str_replace('ids', '', $key).','.$ids; |
|
251 | 251 | } |
252 | 252 | $ids = substr($ids, 0, -1); |
253 | 253 | } |
@@ -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 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
211 | 211 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
212 | 212 | } else { |
213 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
213 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | if ($row['規格分類1(ID)'] != '') { |
219 | 219 | |
220 | 220 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
221 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
221 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
222 | 222 | } else { |
223 | 223 | // 商品規格あり |
224 | 224 | // 企画分類あり商品を作成 |
@@ -233,30 +233,30 @@ discard block |
||
233 | 233 | if (is_numeric($row['規格分類1(ID)'])) { |
234 | 234 | $ClassCategory1 = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
235 | 235 | if (!$ClassCategory1) { |
236 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
236 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
237 | 237 | } else { |
238 | 238 | $ProductClass->setClassCategory1($ClassCategory1); |
239 | 239 | } |
240 | 240 | } else { |
241 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
241 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | if ($row['規格分類2(ID)'] != '') { |
245 | 245 | if (is_numeric($row['規格分類2(ID)'])) { |
246 | 246 | $ClassCategory2 = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
247 | 247 | if (!$ClassCategory2) { |
248 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
248 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
249 | 249 | } else { |
250 | 250 | if ($ClassCategory1 && |
251 | 251 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
252 | 252 | ) { |
253 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
253 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
254 | 254 | } else { |
255 | 255 | $ProductClass->setClassCategory2($ClassCategory2); |
256 | 256 | } |
257 | 257 | } |
258 | 258 | } else { |
259 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
259 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
260 | 260 | } |
261 | 261 | } |
262 | 262 | $ProductClass->setProductStock($ProductStock); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | |
269 | 269 | } else { |
270 | 270 | if ($row['規格分類2(ID)'] != '') { |
271 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
271 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
297 | 297 | $pc->setDeliveryFee($deliveryFee); |
298 | 298 | } else { |
299 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
299 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | } |
319 | 319 | |
320 | 320 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
321 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
321 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
322 | 322 | } else { |
323 | 323 | |
324 | 324 | // 必ず規格分類1がセットされている |
@@ -327,36 +327,36 @@ discard block |
||
327 | 327 | if (is_numeric($classCategoryId1)) { |
328 | 328 | $ClassCategory1 = $app['eccube.repository.class_category']->find($classCategoryId1); |
329 | 329 | if (!$ClassCategory1) { |
330 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
330 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
331 | 331 | } |
332 | 332 | } else { |
333 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
333 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | $ClassCategory2 = null; |
337 | 337 | if ($row['規格分類2(ID)'] != '') { |
338 | 338 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
339 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
339 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
340 | 340 | } else { |
341 | 341 | if (is_numeric($classCategoryId2)) { |
342 | 342 | $ClassCategory2 = $app['eccube.repository.class_category']->find($classCategoryId2); |
343 | 343 | if (!$ClassCategory2) { |
344 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
344 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
345 | 345 | } else { |
346 | 346 | if ($ClassCategory1 && |
347 | 347 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
348 | 348 | ) { |
349 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
349 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | } else { |
353 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
353 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | } |
357 | 357 | } else { |
358 | 358 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
359 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
359 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
360 | 360 | } |
361 | 361 | } |
362 | 362 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
368 | 368 | $ProductClass->setDeliveryFee($deliveryFee); |
369 | 369 | } else { |
370 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
370 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | } |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | foreach ($data as $row) { |
452 | 452 | |
453 | 453 | if ($headerSize != count($row)) { |
454 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
454 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
455 | 455 | return $this->render($app, $form, $headers, $this->categoryTwig); |
456 | 456 | } |
457 | 457 | |
@@ -460,23 +460,23 @@ discard block |
||
460 | 460 | $this->em->persist($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()) { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | throw new NotFoundHttpException(); |
559 | 559 | } |
560 | 560 | |
561 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
561 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
562 | 562 | |
563 | 563 | // ヘッダ行の出力 |
564 | 564 | $row = array(); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | }); |
574 | 574 | |
575 | 575 | $response->headers->set('Content-Type', 'application/octet-stream'); |
576 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
576 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
577 | 577 | $response->send(); |
578 | 578 | |
579 | 579 | return $response; |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | if (!empty($this->fileName)) { |
598 | 598 | try { |
599 | 599 | $fs = new Filesystem(); |
600 | - $fs->remove($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
600 | + $fs->remove($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
601 | 601 | } catch (\Exception $e) { |
602 | 602 | // エラーが発生しても無視する |
603 | 603 | } |
@@ -620,10 +620,10 @@ discard block |
||
620 | 620 | protected function getImportData($app, $formFile) |
621 | 621 | { |
622 | 622 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
623 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
623 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
624 | 624 | $formFile->move($app['config']['csv_temp_realdir'], $this->fileName); |
625 | 625 | |
626 | - $file = file_get_contents($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
626 | + $file = file_get_contents($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
627 | 627 | // アップロードされたファイルがUTF-8以外は文字コード変換を行う |
628 | 628 | $encode = Str::characterEncoding(substr($file, 0, 6)); |
629 | 629 | if ($encode != 'UTF-8') { |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | if (is_numeric($category)) { |
703 | 703 | $Category = $app['eccube.repository.category']->find($category); |
704 | 704 | if (!$Category) { |
705 | - $this->addErrors(($data->key() + 1) . '行目の商品カテゴリ(ID)「' . $category . '」が存在しません。'); |
|
705 | + $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。'); |
|
706 | 706 | } else { |
707 | 707 | $ProductCategory = new ProductCategory(); |
708 | 708 | $ProductCategory->setProductId($Product->getId()); |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | $this->em->persist($ProductCategory); |
716 | 716 | } |
717 | 717 | } else { |
718 | - $this->addErrors(($data->key() + 1) . '行目の商品カテゴリ(ID)「' . $category . '」が存在しません。'); |
|
718 | + $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。'); |
|
719 | 719 | } |
720 | 720 | } |
721 | 721 | |
@@ -735,17 +735,17 @@ discard block |
||
735 | 735 | |
736 | 736 | |
737 | 737 | if ($row['商品種別(ID)'] == '') { |
738 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
738 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
739 | 739 | } else { |
740 | 740 | if (is_numeric($row['商品種別(ID)'])) { |
741 | 741 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
742 | 742 | if (!$ProductType) { |
743 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
743 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
744 | 744 | } else { |
745 | 745 | $ProductClass->setProductType($ProductType); |
746 | 746 | } |
747 | 747 | } else { |
748 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
748 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
749 | 749 | } |
750 | 750 | } |
751 | 751 | |
@@ -756,12 +756,12 @@ discard block |
||
756 | 756 | if (is_numeric($row['発送日目安(ID)'])) { |
757 | 757 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
758 | 758 | if (!$DeliveryDate) { |
759 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
759 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
760 | 760 | } else { |
761 | 761 | $ProductClass->setDeliveryDate($DeliveryDate); |
762 | 762 | } |
763 | 763 | } else { |
764 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
764 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
765 | 765 | } |
766 | 766 | } |
767 | 767 | |
@@ -772,27 +772,27 @@ discard block |
||
772 | 772 | } |
773 | 773 | |
774 | 774 | if ($row['在庫数無制限フラグ'] == '') { |
775 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
775 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
776 | 776 | } else { |
777 | - if ($row['在庫数無制限フラグ'] == (string)Constant::DISABLED) { |
|
777 | + if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
|
778 | 778 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
779 | 779 | // 在庫数が設定されていなければエラー |
780 | 780 | if ($row['在庫数'] == '') { |
781 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
781 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
782 | 782 | } else { |
783 | 783 | $stock = str_replace(',', '', $row['在庫数']); |
784 | 784 | if (is_numeric($stock) && $stock >= 0) { |
785 | 785 | $ProductClass->setStock($stock); |
786 | 786 | } else { |
787 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
787 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
788 | 788 | } |
789 | 789 | } |
790 | 790 | |
791 | - } else if ($row['在庫数無制限フラグ'] == (string)Constant::ENABLED) { |
|
791 | + } else if ($row['在庫数無制限フラグ'] == (string) Constant::ENABLED) { |
|
792 | 792 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
793 | 793 | $ProductClass->setStock(null); |
794 | 794 | } else { |
795 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
795 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
796 | 796 | } |
797 | 797 | } |
798 | 798 | |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
802 | 802 | $ProductClass->setSaleLimit($saleLimit); |
803 | 803 | } else { |
804 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
804 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
805 | 805 | } |
806 | 806 | } |
807 | 807 | |
@@ -810,18 +810,18 @@ discard block |
||
810 | 810 | if (is_numeric($price01) && $price01 >= 0) { |
811 | 811 | $ProductClass->setPrice01($price01); |
812 | 812 | } else { |
813 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
813 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
814 | 814 | } |
815 | 815 | } |
816 | 816 | |
817 | 817 | if ($row['販売価格'] == '') { |
818 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
818 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
819 | 819 | } else { |
820 | 820 | $price02 = str_replace(',', '', $row['販売価格']); |
821 | 821 | if (is_numeric($price02) && $price02 >= 0) { |
822 | 822 | $ProductClass->setPrice02($price02); |
823 | 823 | } else { |
824 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
824 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
825 | 825 | } |
826 | 826 | } |
827 | 827 | |
@@ -830,17 +830,17 @@ discard block |
||
830 | 830 | if (is_numeric($delivery_fee) && $delivery_fee >= 0) { |
831 | 831 | $ProductClass->setDeliveryFee($delivery_fee); |
832 | 832 | } else { |
833 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
833 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
834 | 834 | } |
835 | 835 | } |
836 | 836 | |
837 | 837 | if ($row['商品規格削除フラグ'] == '') { |
838 | 838 | $ProductClass->setDelFlg(Constant::DISABLED); |
839 | 839 | } else { |
840 | - if ($row['商品規格削除フラグ'] == (string)Constant::DISABLED || $row['商品規格削除フラグ'] == (string)Constant::ENABLED) { |
|
840 | + if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
|
841 | 841 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
842 | 842 | } else { |
843 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
843 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
844 | 844 | } |
845 | 845 | } |
846 | 846 | |
@@ -873,17 +873,17 @@ discard block |
||
873 | 873 | $ProductClass->setProduct($Product); |
874 | 874 | |
875 | 875 | if ($row['商品種別(ID)'] == '') { |
876 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
876 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
877 | 877 | } else { |
878 | 878 | if (is_numeric($row['商品種別(ID)'])) { |
879 | 879 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
880 | 880 | if (!$ProductType) { |
881 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
881 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
882 | 882 | } else { |
883 | 883 | $ProductClass->setProductType($ProductType); |
884 | 884 | } |
885 | 885 | } else { |
886 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
886 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
887 | 887 | } |
888 | 888 | } |
889 | 889 | |
@@ -892,12 +892,12 @@ discard block |
||
892 | 892 | if (is_numeric($row['規格分類1(ID)'])) { |
893 | 893 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
894 | 894 | if (!$ClassCategory) { |
895 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
895 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
896 | 896 | } else { |
897 | 897 | $ProductClass->setClassCategory1($ClassCategory); |
898 | 898 | } |
899 | 899 | } else { |
900 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
900 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
901 | 901 | } |
902 | 902 | } |
903 | 903 | |
@@ -905,12 +905,12 @@ discard block |
||
905 | 905 | if (is_numeric($row['規格分類2(ID)'])) { |
906 | 906 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
907 | 907 | if (!$ClassCategory) { |
908 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
908 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
909 | 909 | } else { |
910 | 910 | $ProductClass->setClassCategory2($ClassCategory); |
911 | 911 | } |
912 | 912 | } else { |
913 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
913 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
914 | 914 | } |
915 | 915 | } |
916 | 916 | |
@@ -918,12 +918,12 @@ discard block |
||
918 | 918 | if (is_numeric($row['発送日目安(ID)'])) { |
919 | 919 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
920 | 920 | if (!$DeliveryDate) { |
921 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
921 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
922 | 922 | } else { |
923 | 923 | $ProductClass->setDeliveryDate($DeliveryDate); |
924 | 924 | } |
925 | 925 | } else { |
926 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
926 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
927 | 927 | } |
928 | 928 | } |
929 | 929 | |
@@ -934,27 +934,27 @@ discard block |
||
934 | 934 | } |
935 | 935 | |
936 | 936 | if ($row['在庫数無制限フラグ'] == '') { |
937 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
937 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
938 | 938 | } else { |
939 | - if ($row['在庫数無制限フラグ'] == (string)Constant::DISABLED) { |
|
939 | + if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
|
940 | 940 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
941 | 941 | // 在庫数が設定されていなければエラー |
942 | 942 | if ($row['在庫数'] == '') { |
943 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
943 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
944 | 944 | } else { |
945 | 945 | $stock = str_replace(',', '', $row['在庫数']); |
946 | 946 | if (is_numeric($stock) && $stock >= 0) { |
947 | 947 | $ProductClass->setStock($row['在庫数']); |
948 | 948 | } else { |
949 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
949 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
950 | 950 | } |
951 | 951 | } |
952 | 952 | |
953 | - } else if ($row['在庫数無制限フラグ'] == (string)Constant::ENABLED) { |
|
953 | + } else if ($row['在庫数無制限フラグ'] == (string) Constant::ENABLED) { |
|
954 | 954 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
955 | 955 | $ProductClass->setStock(null); |
956 | 956 | } else { |
957 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
957 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
958 | 958 | } |
959 | 959 | } |
960 | 960 | |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
964 | 964 | $ProductClass->setSaleLimit($saleLimit); |
965 | 965 | } else { |
966 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
966 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
967 | 967 | } |
968 | 968 | } |
969 | 969 | |
@@ -972,28 +972,28 @@ discard block |
||
972 | 972 | if (is_numeric($price01) && $price01 >= 0) { |
973 | 973 | $ProductClass->setPrice01($price01); |
974 | 974 | } else { |
975 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
975 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
976 | 976 | } |
977 | 977 | } |
978 | 978 | |
979 | 979 | if ($row['販売価格'] == '') { |
980 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
980 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
981 | 981 | } else { |
982 | 982 | $price02 = str_replace(',', '', $row['販売価格']); |
983 | 983 | if (is_numeric($price02) && $price02 >= 0) { |
984 | 984 | $ProductClass->setPrice02($price02); |
985 | 985 | } else { |
986 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
986 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
987 | 987 | } |
988 | 988 | } |
989 | 989 | |
990 | 990 | if ($row['商品規格削除フラグ'] == '') { |
991 | 991 | $ProductClass->setDelFlg(Constant::DISABLED); |
992 | 992 | } else { |
993 | - if ($row['商品規格削除フラグ'] == (string)Constant::DISABLED || $row['商品規格削除フラグ'] == (string)Constant::ENABLED) { |
|
993 | + if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
|
994 | 994 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
995 | 995 | } else { |
996 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
996 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
997 | 997 | } |
998 | 998 | } |
999 | 999 |
@@ -430,6 +430,9 @@ discard block |
||
430 | 430 | /** |
431 | 431 | * 登録、更新時のエラー画面表示 |
432 | 432 | * |
433 | + * @param Application $app |
|
434 | + * @param boolean $not_product_class |
|
435 | + * @param \Symfony\Component\Form\Form $classForm |
|
433 | 436 | */ |
434 | 437 | protected function render($app, $Product, $ProductClass, $not_product_class, $classForm, $error = null) |
435 | 438 | { |
@@ -479,6 +482,7 @@ discard block |
||
479 | 482 | |
480 | 483 | /** |
481 | 484 | * 規格1と規格2を組み合わせた商品規格を作成 |
485 | + * @param Application $app |
|
482 | 486 | */ |
483 | 487 | private function createProductClasses($app, Product $Product, ClassName $ClassName1 = null, ClassName $ClassName2 = null) |
484 | 488 | { |
@@ -566,6 +570,7 @@ discard block |
||
566 | 570 | * |
567 | 571 | * @param $productClassDest コピー先となる商品規格 |
568 | 572 | * @param $productClassOrig コピー元となる商品規格 |
573 | + * @param Application $app |
|
569 | 574 | */ |
570 | 575 | private function setDefualtProductClass($app, $productClassDest, $productClassOrig) { |
571 | 576 | $productClassDest->setDeliveryDate($productClassOrig->getDeliveryDate()); |
@@ -607,6 +612,7 @@ discard block |
||
607 | 612 | * 商品規格を登録 |
608 | 613 | * |
609 | 614 | * @param $ProductClasses 登録される商品規格 |
615 | + * @param Application $app |
|
610 | 616 | */ |
611 | 617 | private function insertProductClass($app, $Product, $ProductClasses) { |
612 | 618 | |
@@ -659,7 +665,6 @@ discard block |
||
659 | 665 | /** |
660 | 666 | * 規格の分類判定 |
661 | 667 | * |
662 | - * @param Eccube\Entity\ClassName $ClassesName |
|
663 | 668 | * @return boolean |
664 | 669 | */ |
665 | 670 | private function isValiedCategory($class_name) |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $class2Valied = $this->isValiedCategory($ClassName2); |
95 | 95 | |
96 | 96 | // 規格が選択されていないか、選択された状態で分類が保有されていれば、画面表示 |
97 | - if($class1Valied && $class2Valied){ |
|
97 | + if ($class1Valied && $class2Valied) { |
|
98 | 98 | $hasClassCategoryFlg = true; |
99 | 99 | } |
100 | 100 | |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | // 個別消費税 |
583 | 583 | $BaseInfo = $app['eccube.repository.base_info']->get(); |
584 | 584 | if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED) { |
585 | - if($productClassOrig->getTaxRate()) { |
|
585 | + if ($productClassOrig->getTaxRate()) { |
|
586 | 586 | $productClassDest->setTaxRate($productClassOrig->getTaxRate()); |
587 | 587 | if ($productClassDest->getTaxRule() && !$productClassDest->getTaxRule()->getDelFlg()) { |
588 | 588 | $productClassDest->getTaxRule()->setTaxRate($productClassOrig->getTaxRate()); |
@@ -642,7 +642,7 @@ |
||
642 | 642 | * |
643 | 643 | * @param Request $request |
644 | 644 | * @param $authKey |
645 | - * @param $url |
|
645 | + * @param string $url |
|
646 | 646 | * @return array |
647 | 647 | */ |
648 | 648 | private function getRequestApi(Request $request, $authKey, $url) |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | foreach ($Plugins as $Plugin) { |
59 | 59 | |
60 | 60 | $form = $app['form.factory'] |
61 | - ->createNamedBuilder('form' . $Plugin->getId(), 'plugin_management', null, array( |
|
61 | + ->createNamedBuilder('form'.$Plugin->getId(), 'plugin_management', null, array( |
|
62 | 62 | 'plugin_id' => $Plugin->getId(), |
63 | 63 | )) |
64 | 64 | ->getForm(); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | try { |
69 | 69 | // プラグイン用設定画面があれば表示(プラグイン用のサービスプロバイダーに定義されているか) |
70 | - $configPages[$Plugin->getCode()] = $app->url('plugin_' . $Plugin->getCode() . '_config'); |
|
70 | + $configPages[$Plugin->getCode()] = $app->url('plugin_'.$Plugin->getCode().'_config'); |
|
71 | 71 | } catch (\Exception $e) { |
72 | 72 | // プラグインで設定画面のルートが定義されていない場合は無視 |
73 | 73 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (!is_null($authKey)) { |
90 | 90 | |
91 | 91 | // オーナーズストア通信 |
92 | - $url = $app['config']['owners_store_url'] . '?method=list'; |
|
92 | + $url = $app['config']['owners_store_url'].'?method=list'; |
|
93 | 93 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
94 | 94 | |
95 | 95 | if ($json) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $Plugin = $app['eccube.repository.plugin']->find($id); |
151 | 151 | |
152 | 152 | $form = $app['form.factory'] |
153 | - ->createNamedBuilder('form' . $id, 'plugin_management', null, array( |
|
153 | + ->createNamedBuilder('form'.$id, 'plugin_management', null, array( |
|
154 | 154 | 'plugin_id' => null, // placeHolder |
155 | 155 | )) |
156 | 156 | ->getForm(); |
@@ -168,10 +168,10 @@ discard block |
||
168 | 168 | $formFile = $form['plugin_archive']->getData(); |
169 | 169 | |
170 | 170 | $tmpDir = $app['eccube.service.plugin']->createTempDir(); |
171 | - $tmpFile = sha1(Str::random(32)) . '.' . $formFile->getClientOriginalExtension(); |
|
171 | + $tmpFile = sha1(Str::random(32)).'.'.$formFile->getClientOriginalExtension(); |
|
172 | 172 | |
173 | 173 | $formFile->move($tmpDir, $tmpFile); |
174 | - $app['eccube.service.plugin']->update($Plugin, $tmpDir . '/' . $tmpFile); |
|
174 | + $app['eccube.service.plugin']->update($Plugin, $tmpDir.'/'.$tmpFile); |
|
175 | 175 | |
176 | 176 | $fs = new Filesystem(); |
177 | 177 | $fs->remove($tmpDir); |
@@ -340,11 +340,11 @@ discard block |
||
340 | 340 | $formFile = $form['plugin_archive']->getData(); |
341 | 341 | |
342 | 342 | $tmpDir = $service->createTempDir(); |
343 | - $tmpFile = sha1(Str::random(32)) . '.' . $formFile->getClientOriginalExtension(); // 拡張子を付けないとpharが動かないので付ける |
|
343 | + $tmpFile = sha1(Str::random(32)).'.'.$formFile->getClientOriginalExtension(); // 拡張子を付けないとpharが動かないので付ける |
|
344 | 344 | |
345 | 345 | $formFile->move($tmpDir, $tmpFile); |
346 | 346 | |
347 | - $service->install($tmpDir . '/' . $tmpFile); |
|
347 | + $service->install($tmpDir.'/'.$tmpFile); |
|
348 | 348 | |
349 | 349 | $fs = new Filesystem(); |
350 | 350 | $fs->remove($tmpDir); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | if (!is_null($authKey)) { |
392 | 392 | |
393 | 393 | // オーナーズストア通信 |
394 | - $url = $app['config']['owners_store_url'] . '?method=list'; |
|
394 | + $url = $app['config']['owners_store_url'].'?method=list'; |
|
395 | 395 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
396 | 396 | |
397 | 397 | if ($json === false) { |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | } |
466 | 466 | |
467 | 467 | } else { |
468 | - $message = $data['error_code'] . ' : ' . $data['error_message']; |
|
468 | + $message = $data['error_code'].' : '.$data['error_message']; |
|
469 | 469 | } |
470 | 470 | } else { |
471 | 471 | $success = 0; |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | if (!is_null($authKey)) { |
508 | 508 | |
509 | 509 | // オーナーズストア通信 |
510 | - $url = $app['config']['owners_store_url'] . '?method=download&product_id=' . $id; |
|
510 | + $url = $app['config']['owners_store_url'].'?method=download&product_id='.$id; |
|
511 | 511 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
512 | 512 | |
513 | 513 | if ($json === false) { |
@@ -532,22 +532,22 @@ discard block |
||
532 | 532 | $extension = pathinfo($item['file_name'], PATHINFO_EXTENSION); |
533 | 533 | |
534 | 534 | $tmpDir = $service->createTempDir(); |
535 | - $tmpFile = sha1(Str::random(32)) . '.' . $extension; |
|
535 | + $tmpFile = sha1(Str::random(32)).'.'.$extension; |
|
536 | 536 | |
537 | 537 | // ファイル作成 |
538 | 538 | $fs = new Filesystem(); |
539 | - $fs->dumpFile($tmpDir . '/' . $tmpFile, $file); |
|
539 | + $fs->dumpFile($tmpDir.'/'.$tmpFile, $file); |
|
540 | 540 | |
541 | 541 | if ($action == 'install') { |
542 | 542 | |
543 | - $service->install($tmpDir . '/' . $tmpFile, $id); |
|
543 | + $service->install($tmpDir.'/'.$tmpFile, $id); |
|
544 | 544 | $app->addSuccess('admin.plugin.install.complete', 'admin'); |
545 | 545 | |
546 | 546 | } else if ($action == 'update') { |
547 | 547 | |
548 | 548 | $Plugin = $app['eccube.repository.plugin']->findOneBy(array('source' => $id)); |
549 | 549 | |
550 | - $service->update($Plugin, $tmpDir . '/' . $tmpFile); |
|
550 | + $service->update($Plugin, $tmpDir.'/'.$tmpFile); |
|
551 | 551 | $app->addSuccess('admin.plugin.update.complete', 'admin'); |
552 | 552 | |
553 | 553 | Cache::clear($app, false); |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | $fs->remove($tmpDir); |
559 | 559 | |
560 | 560 | // ダウンロード完了通知処理(正常終了時) |
561 | - $url = $app['config']['owners_store_url'] . '?method=commit&product_id=' . $id . '&status=1&version=' . $version; |
|
561 | + $url = $app['config']['owners_store_url'].'?method=commit&product_id='.$id.'&status=1&version='.$version; |
|
562 | 562 | $this->getRequestApi($request, $authKey, $url); |
563 | 563 | |
564 | 564 | return $app->redirect($app->url('admin_store_plugin')); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | } |
573 | 573 | |
574 | 574 | } else { |
575 | - $message = $data['error_code'] . ' : ' . $data['error_message']; |
|
575 | + $message = $data['error_code'].' : '.$data['error_message']; |
|
576 | 576 | } |
577 | 577 | } else { |
578 | 578 | $message = "EC-CUBEオーナーズストアにエラーが発生しています。"; |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | } |
582 | 582 | |
583 | 583 | // ダウンロード完了通知処理(エラー発生時) |
584 | - $url = $app['config']['owners_store_url'] . '?method=commit&product_id=' . $id . '&status=0&version=' . $version . '&message=' . urlencode($message); |
|
584 | + $url = $app['config']['owners_store_url'].'?method=commit&product_id='.$id.'&status=0&version='.$version.'&message='.urlencode($message); |
|
585 | 585 | $this->getRequestApi($request, $authKey, $url); |
586 | 586 | |
587 | 587 | $app->addError($message, 'admin'); |
@@ -653,9 +653,9 @@ discard block |
||
653 | 653 | 'ignore_errors' => false, |
654 | 654 | 'timeout' => 60, |
655 | 655 | 'header' => array( |
656 | - 'Authorization: ' . base64_encode($authKey), |
|
657 | - 'x-eccube-store-url: ' . base64_encode($request->getSchemeAndHttpHost() . $request->getBasePath()), |
|
658 | - 'x-eccube-store-version: ' . base64_encode(Constant::VERSION) |
|
656 | + 'Authorization: '.base64_encode($authKey), |
|
657 | + 'x-eccube-store-url: '.base64_encode($request->getSchemeAndHttpHost().$request->getBasePath()), |
|
658 | + 'x-eccube-store-version: '.base64_encode(Constant::VERSION) |
|
659 | 659 | ) |
660 | 660 | ) |
661 | 661 | ); |
@@ -680,10 +680,10 @@ discard block |
||
680 | 680 | |
681 | 681 | switch ($statusCode) { |
682 | 682 | case '404': |
683 | - $message = $statusCode . ' : ' . $message; |
|
683 | + $message = $statusCode.' : '.$message; |
|
684 | 684 | break; |
685 | 685 | case '500': |
686 | - $message = $statusCode . ' : ' . $message; |
|
686 | + $message = $statusCode.' : '.$message; |
|
687 | 687 | break; |
688 | 688 | default: |
689 | 689 | $message = "EC-CUBEオーナーズストアにエラーが発生しています。"; |
@@ -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) |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $host = $request->getSchemeAndHttpHost(); |
208 | 208 | $basePath = $request->getBasePath(); |
209 | 209 | $params = array( |
210 | - 'http_url' => $host . $basePath, |
|
210 | + 'http_url' => $host.$basePath, |
|
211 | 211 | 'shop_name' => $sessionData['shop_name'], |
212 | 212 | ); |
213 | 213 | |
@@ -228,13 +228,13 @@ discard block |
||
228 | 228 | // インストール完了 |
229 | 229 | public function complete(InstallApplication $app, Request $request) |
230 | 230 | { |
231 | - $config_file = $this->config_path . '/path.yml'; |
|
231 | + $config_file = $this->config_path.'/path.yml'; |
|
232 | 232 | $config = Yaml::parse($config_file); |
233 | 233 | |
234 | 234 | $host = $request->getSchemeAndHttpHost(); |
235 | 235 | $basePath = $request->getBasePath(); |
236 | 236 | |
237 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
237 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
238 | 238 | |
239 | 239 | return $app['twig']->render('complete.twig', array( |
240 | 240 | 'admin_url' => $adminUrl, |
@@ -254,17 +254,17 @@ discard block |
||
254 | 254 | { |
255 | 255 | foreach ($this->required_modules as $module) { |
256 | 256 | if (!extension_loaded($module)) { |
257 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
257 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | |
261 | 261 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
262 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
262 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | foreach ($this->recommended_module as $module) { |
266 | 266 | if (!extension_loaded($module)) { |
267 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
267 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
268 | 268 | } |
269 | 269 | } |
270 | 270 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | if (!function_exists('apache_get_modules')) { |
283 | 283 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
284 | 284 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
285 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
285 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
286 | 286 | } |
287 | 287 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
288 | 288 | // iis |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | |
294 | 294 | private function setPDO() |
295 | 295 | { |
296 | - $config_file = $this->config_path . '/database.yml'; |
|
296 | + $config_file = $this->config_path.'/database.yml'; |
|
297 | 297 | $config = Yaml::parse($config_file); |
298 | 298 | |
299 | 299 | try { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | */ |
329 | 329 | private function getEntityManager() |
330 | 330 | { |
331 | - $config_file = $this->config_path . '/database.yml'; |
|
331 | + $config_file = $this->config_path.'/database.yml'; |
|
332 | 332 | $database = Yaml::parse($config_file); |
333 | 333 | |
334 | 334 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -336,15 +336,15 @@ discard block |
||
336 | 336 | )); |
337 | 337 | |
338 | 338 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
339 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
339 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
340 | 340 | 'orm.em.options' => array( |
341 | 341 | 'mappings' => array( |
342 | 342 | array( |
343 | 343 | 'type' => 'yml', |
344 | 344 | 'namespace' => 'Eccube\Entity', |
345 | 345 | 'path' => array( |
346 | - __DIR__ . '/../../Resource/doctrine', |
|
347 | - __DIR__ . '/../../Resource/doctrine/master', |
|
346 | + __DIR__.'/../../Resource/doctrine', |
|
347 | + __DIR__.'/../../Resource/doctrine/master', |
|
348 | 348 | ), |
349 | 349 | ), |
350 | 350 | |
@@ -372,11 +372,11 @@ discard block |
||
372 | 372 | { |
373 | 373 | $this->resetNatTimer(); |
374 | 374 | |
375 | - $config_file = $this->config_path . '/database.yml'; |
|
375 | + $config_file = $this->config_path.'/database.yml'; |
|
376 | 376 | $database = Yaml::parse($config_file); |
377 | 377 | $config['database'] = $database['database']; |
378 | 378 | |
379 | - $config_file = $this->config_path . '/config.yml'; |
|
379 | + $config_file = $this->config_path.'/config.yml'; |
|
380 | 380 | $baseConfig = Yaml::parse($config_file); |
381 | 381 | $config['config'] = $baseConfig; |
382 | 382 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | $config = new Configuration($app['db']); |
436 | 436 | $config->setMigrationsNamespace('DoctrineMigrations'); |
437 | 437 | |
438 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
438 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
439 | 439 | $config->setMigrationsDirectory($migrationDir); |
440 | 440 | $config->registerMigrationsFromDirectory($migrationDir); |
441 | 441 | |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | private function getProtectedDirs() |
460 | 460 | { |
461 | 461 | $protectedDirs = array(); |
462 | - $base = __DIR__ . '/../../../..'; |
|
462 | + $base = __DIR__.'/../../../..'; |
|
463 | 463 | $dirs = array( |
464 | 464 | '/html', |
465 | 465 | '/app', |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | ); |
473 | 473 | |
474 | 474 | foreach ($dirs as $dir) { |
475 | - if (!is_writable($base . $dir)) { |
|
475 | + if (!is_writable($base.$dir)) { |
|
476 | 476 | $protectedDirs[] = $dir; |
477 | 477 | } |
478 | 478 | } |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | private function createConfigYamlFile($data) |
484 | 484 | { |
485 | 485 | $fs = new Filesystem(); |
486 | - $config_file = $this->config_path . '/config.yml'; |
|
486 | + $config_file = $this->config_path.'/config.yml'; |
|
487 | 487 | if ($fs->exists($config_file)) { |
488 | 488 | $fs->remove($config_file); |
489 | 489 | } |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | $content = str_replace( |
504 | 504 | $target, |
505 | 505 | $replace, |
506 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
506 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
507 | 507 | ); |
508 | 508 | $fs->dumpFile($config_file, $content); |
509 | 509 | |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | |
518 | 518 | private function addInstallStatus() |
519 | 519 | { |
520 | - $config_file = $this->config_path . '/config.yml'; |
|
520 | + $config_file = $this->config_path.'/config.yml'; |
|
521 | 521 | $config = Yaml::parse($config_file); |
522 | 522 | $config['eccube_install'] = 1; |
523 | 523 | $yml = Yaml::dump($config); |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | private function createDatabaseYamlFile($data) |
530 | 530 | { |
531 | 531 | $fs = new Filesystem(); |
532 | - $config_file = $this->config_path . '/database.yml'; |
|
532 | + $config_file = $this->config_path.'/database.yml'; |
|
533 | 533 | if ($fs->exists($config_file)) { |
534 | 534 | $fs->remove($config_file); |
535 | 535 | } |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | $content = str_replace( |
563 | 563 | $target, |
564 | 564 | $replace, |
565 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
565 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
566 | 566 | ); |
567 | 567 | |
568 | 568 | $fs->dumpFile($config_file, $content); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | private function createMailYamlFile($data) |
574 | 574 | { |
575 | 575 | $fs = new Filesystem(); |
576 | - $config_file = $this->config_path . '/mail.yml'; |
|
576 | + $config_file = $this->config_path.'/mail.yml'; |
|
577 | 577 | if ($fs->exists($config_file)) { |
578 | 578 | $fs->remove($config_file); |
579 | 579 | } |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | $content = str_replace( |
591 | 591 | $target, |
592 | 592 | $replace, |
593 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
593 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
594 | 594 | ); |
595 | 595 | $fs->dumpFile($config_file, $content); |
596 | 596 | |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | private function createPathYamlFile($data, Request $request) |
601 | 601 | { |
602 | 602 | $fs = new Filesystem(); |
603 | - $config_file = $this->config_path . '/path.yml'; |
|
603 | + $config_file = $this->config_path.'/path.yml'; |
|
604 | 604 | if ($fs->exists($config_file)) { |
605 | 605 | $fs->remove($config_file); |
606 | 606 | } |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | $ADMIN_ROUTE = $data['admin_dir']; |
609 | 609 | $TEMPLATE_CODE = 'default'; |
610 | 610 | $USER_DATA_ROUTE = 'user_data'; |
611 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
611 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
612 | 612 | $ROOT_URLPATH = $request->getBasePath(); |
613 | 613 | |
614 | 614 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}'); |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | $content = str_replace( |
619 | 619 | $target, |
620 | 620 | $replace, |
621 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
621 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
622 | 622 | ); |
623 | 623 | $fs->dumpFile($config_file, $content); |
624 | 624 | |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | |
628 | 628 | private function sendAppData($params) |
629 | 629 | { |
630 | - $config_file = $this->config_path . '/database.yml'; |
|
630 | + $config_file = $this->config_path.'/database.yml'; |
|
631 | 631 | $db_config = Yaml::parse($config_file); |
632 | 632 | |
633 | 633 | $this->setPDO(); |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | } |
640 | 640 | |
641 | 641 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
642 | - $db_ver = 'MySQL:' . $version; |
|
642 | + $db_ver = 'MySQL:'.$version; |
|
643 | 643 | } else { |
644 | 644 | $db_ver = $version; |
645 | 645 | } |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | |
658 | 658 | $header = array( |
659 | 659 | 'Content-Type: application/x-www-form-urlencoded', |
660 | - 'Content-Length: ' . strlen($data), |
|
660 | + 'Content-Length: '.strlen($data), |
|
661 | 661 | ); |
662 | 662 | $context = stream_context_create( |
663 | 663 | array( |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * Index |
36 | 36 | * |
37 | 37 | * @param Application $app |
38 | - * @return string |
|
38 | + * @return \Symfony\Component\HttpFoundation\Response |
|
39 | 39 | */ |
40 | 40 | public function index(Application $app, Request $request) |
41 | 41 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @param Application $app |
53 | 53 | * @request Symfony\Component\HttpFoundation\Request $app |
54 | - * @return mixed |
|
54 | + * @return \Symfony\Component\HttpFoundation\Response |
|
55 | 55 | */ |
56 | 56 | public function edit(Application $app, Request $request, $id = null) |
57 | 57 | { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する |
81 | 81 | if (!in_array($parentPage, $allowdParents)) { |
82 | - $parentPage = $app->url('mypage_delivery'); |
|
82 | + $parentPage = $app->url('mypage_delivery'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /* @var $form \Symfony\Component\Form\FormInterface */ |