@@ -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; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $arrFileList = $this->getFileList($app, $nowDir); |
| 85 | 85 | |
| 86 | 86 | $javascript = $this->getJsArrayList($tree); |
| 87 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
| 87 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
| 88 | 88 | |
| 89 | 89 | return $app->render('Content/file.twig', array( |
| 90 | 90 | 'form' => $form->createView(), |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
| 142 | 142 | ? $this->normalizePath($request->get('now_dir')) |
| 143 | 143 | : $topDir; |
| 144 | - $fs->mkdir($nowDir . '/' . $filename); |
|
| 144 | + $fs->mkdir($nowDir.'/'.$filename); |
|
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -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); |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する |
| 84 | 84 | if (!in_array($parentPage, $allowdParents)) { |
| 85 | 85 | // @deprecated 使用されていないコード |
| 86 | - $parentPage = $app->url('mypage_delivery'); |
|
| 86 | + $parentPage = $app->url('mypage_delivery'); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $builder = $app['form.factory'] |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $paths[] = $app['config']['user_data_realdir']; |
| 56 | 56 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
| 57 | 57 | |
| 58 | - $file = $PageLayout->getFileName() . '.twig'; |
|
| 58 | + $file = $PageLayout->getFileName().'.twig'; |
|
| 59 | 59 | |
| 60 | 60 | $event = new EventArgs( |
| 61 | 61 | array( |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED); |
| 46 | 46 | |
| 47 | 47 | $form = $app['form.factory'] |
| 48 | - ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type]) |
|
| 48 | + ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type]) |
|
| 49 | 49 | ->getForm(); |
| 50 | 50 | $form->handleRequest($app['request']); |
| 51 | 51 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // リセットキーの発行・有効期限の設定 |
| 65 | 65 | $Customer |
| 66 | 66 | ->setResetKey($app['eccube.repository.customer']->getUniqueResetKey($app)) |
| 67 | - ->setResetExpire(new \DateTime('+' . $app['config']['customer_reset_expire'] .' min')); |
|
| 67 | + ->setResetExpire(new \DateTime('+'.$app['config']['customer_reset_expire'].' min')); |
|
| 68 | 68 | |
| 69 | 69 | // リセットキーを更新 |
| 70 | 70 | $app['orm.em']->persist($Customer); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | // ログ出力 |
| 89 | 89 | $app['monolog']->addInfo( |
| 90 | - 'send reset password mail to:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
| 90 | + 'send reset password mail to:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
| 91 | 91 | ); |
| 92 | 92 | } else { |
| 93 | 93 | log_warning('Un active customer try send reset password email: ', array('Enter email' => $form->get('login_email')->getData())); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | // ログ出力 |
| 171 | 171 | $app['monolog']->addInfo( |
| 172 | - 'reset password complete:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
| 172 | + 'reset password complete:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
| 173 | 173 | ); |
| 174 | 174 | } else { |
| 175 | 175 | throw new HttpException\AccessDeniedHttpException('不正なアクセスです。'); |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
| 101 | 101 | $qb |
| 102 | 102 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
| 103 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 103 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // kana |
| 107 | 107 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
| 108 | 108 | $qb |
| 109 | 109 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
| 110 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 110 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $qb |
| 245 | 245 | ->leftJoin('o.OrderDetails', 'od') |
| 246 | 246 | ->andWhere('od.product_name LIKE :buy_product_name') |
| 247 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
| 247 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | // Order By |
@@ -270,13 +270,13 @@ discard block |
||
| 270 | 270 | ->setParameter('order_id_start', $searchData['order_id_start']); |
| 271 | 271 | } |
| 272 | 272 | // multi |
| 273 | - if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
| 273 | + if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
| 274 | 274 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
| 275 | 275 | $qb |
| 276 | - ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . |
|
| 276 | + ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '. |
|
| 277 | 277 | 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
| 278 | 278 | ->setParameter('multi', $multi) |
| 279 | - ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
|
| 279 | + ->setParameter('likemulti', '%'.$searchData['multi'].'%'); |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | // order_id_end |
@@ -313,28 +313,28 @@ discard block |
||
| 313 | 313 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
| 314 | 314 | $qb |
| 315 | 315 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
| 316 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 316 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | // kana |
| 320 | 320 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
| 321 | 321 | $qb |
| 322 | 322 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
| 323 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 323 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | |
| 327 | 327 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
| 328 | 328 | $qb |
| 329 | 329 | ->andWhere('o.email like :email') |
| 330 | - ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
| 330 | + ->setParameter('email', '%'.$searchData['email'].'%'); |
|
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | // tel |
| 334 | 334 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
| 335 | 335 | $qb |
| 336 | 336 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
| 337 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 337 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | // sex |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | $qb |
| 447 | 447 | ->leftJoin('o.OrderDetails', 'od') |
| 448 | 448 | ->andWhere('od.product_name LIKE :buy_product_name') |
| 449 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
| 449 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | // Order By |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $key = sprintf('keyword%s', $index); |
| 114 | 114 | $qb |
| 115 | 115 | ->andWhere(sprintf('NORMALIZE(p.name) LIKE NORMALIZE(:%s) OR NORMALIZE(p.search_word) LIKE NORMALIZE(:%s)', $key, $key)) |
| 116 | - ->setParameter($key, '%' . $keyword . '%'); |
|
| 116 | + ->setParameter($key, '%'.$keyword.'%'); |
|
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $qb |
| 177 | 177 | ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid') |
| 178 | 178 | ->setParameter('id', $id) |
| 179 | - ->setParameter('likeid', '%' . $searchData['id'] . '%'); |
|
| 179 | + ->setParameter('likeid', '%'.$searchData['id'].'%'); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | // code |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | $extension = $image->getClientOriginalExtension(); |
| 205 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 205 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 206 | 206 | $image->move($app['config']['image_temp_realdir'], $filename); |
| 207 | 207 | $files[] = $filename; |
| 208 | 208 | } |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $form = $builder->getForm(); |
| 279 | 279 | |
| 280 | 280 | if (!$has_class) { |
| 281 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
| 281 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
| 282 | 282 | $form['class']->setData($ProductClass); |
| 283 | 283 | } |
| 284 | 284 | |
@@ -364,8 +364,8 @@ discard block |
||
| 364 | 364 | $Categories = $form->get('Category')->getData(); |
| 365 | 365 | $categoriesIdList = array(); |
| 366 | 366 | foreach ($Categories as $Category) { |
| 367 | - foreach($Category->getPath() as $ParentCategory){ |
|
| 368 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
| 367 | + foreach ($Category->getPath() as $ParentCategory) { |
|
| 368 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
| 369 | 369 | $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); |
| 370 | 370 | $app['orm.em']->persist($ProductCategory); |
| 371 | 371 | $count++; |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | $categoriesIdList[$ParentCategory->getId()] = true; |
| 375 | 375 | } |
| 376 | 376 | } |
| 377 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
| 377 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
| 378 | 378 | $ProductCategory = $this->createProductCategory($Product, $Category, $count); |
| 379 | 379 | $app['orm.em']->persist($ProductCategory); |
| 380 | 380 | $count++; |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $app['orm.em']->persist($ProductImage); |
| 397 | 397 | |
| 398 | 398 | // 移動 |
| 399 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
| 399 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
| 400 | 400 | $file->move($app['config']['image_save_realdir']); |
| 401 | 401 | } |
| 402 | 402 | |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | |
| 417 | 417 | // 削除 |
| 418 | 418 | $fs = new Filesystem(); |
| 419 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
| 419 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
| 420 | 420 | } |
| 421 | 421 | $app['orm.em']->persist($Product); |
| 422 | 422 | $app['orm.em']->flush(); |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | foreach ($deleteImages as $deleteImage) { |
| 577 | 577 | try { |
| 578 | 578 | $fs = new Filesystem(); |
| 579 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
| 579 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
| 580 | 580 | } catch (\Exception $e) { |
| 581 | 581 | // エラーが発生しても無視する |
| 582 | 582 | } |
@@ -646,10 +646,10 @@ discard block |
||
| 646 | 646 | |
| 647 | 647 | // 画像ファイルを新規作成 |
| 648 | 648 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
| 649 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 649 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 650 | 650 | try { |
| 651 | 651 | $fs = new Filesystem(); |
| 652 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
| 652 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
| 653 | 653 | } catch (\Exception $e) { |
| 654 | 654 | // エラーが発生しても無視する |
| 655 | 655 | } |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $em->getConfiguration()->setSQLLogger(null); |
| 725 | 725 | |
| 726 | 726 | $response = new StreamedResponse(); |
| 727 | - $response->setCallback(function () use ($app, $request) { |
|
| 727 | + $response->setCallback(function() use ($app, $request) { |
|
| 728 | 728 | |
| 729 | 729 | // CSV種別を元に初期化. |
| 730 | 730 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | |
| 749 | 749 | // データ行の出力. |
| 750 | 750 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 751 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 751 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 752 | 752 | |
| 753 | 753 | $Csvs = $csvService->getCsvs(); |
| 754 | 754 | |
@@ -792,9 +792,9 @@ discard block |
||
| 792 | 792 | }); |
| 793 | 793 | |
| 794 | 794 | $now = new \DateTime(); |
| 795 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
| 795 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
| 796 | 796 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 797 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 797 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 798 | 798 | $response->send(); |
| 799 | 799 | |
| 800 | 800 | log_info('商品CSV出力ファイル名', array($filename)); |