Code Duplication    Length = 16-16 lines in 3 locations

src/Eccube/Service/CsvExportService.php 3 locations

@@ 358-373 (lines=16) @@
355
     * @param Request $request
356
     * @return \Doctrine\ORM\QueryBuilder
357
     */
358
    public function getOrderQueryBuilder(Request $request)
359
    {
360
        $session = $request->getSession();
361
        if ($session->has('eccube.admin.order.search')) {
362
            $searchData = $session->get('eccube.admin.order.search');
363
            $this->findDeserializeObjects($searchData);
364
        } else {
365
            $searchData = array();
366
        }
367
368
        // 受注データのクエリビルダを構築.
369
        $qb = $this->orderRepository
370
            ->getQueryBuilderBySearchDataForAdmin($searchData);
371
372
        return $qb;
373
    }
374
375
    /**
376
     * 会員検索用のクエリビルダを返す.
@@ 381-396 (lines=16) @@
378
     * @param Request $request
379
     * @return \Doctrine\ORM\QueryBuilder
380
     */
381
    public function getCustomerQueryBuilder(Request $request)
382
    {
383
        $session = $request->getSession();
384
        if ($session->has('eccube.admin.customer.search')) {
385
            $searchData = $session->get('eccube.admin.customer.search');
386
            $this->findDeserializeObjects($searchData);
387
        } else {
388
            $searchData = array();
389
        }
390
391
        // 会員データのクエリビルダを構築.
392
        $qb = $this->customerRepository
393
            ->getQueryBuilderBySearchData($searchData);
394
395
        return $qb;
396
    }
397
398
    /**
399
     * 商品検索用のクエリビルダを返す.
@@ 404-419 (lines=16) @@
401
     * @param Request $request
402
     * @return \Doctrine\ORM\QueryBuilder
403
     */
404
    public function getProductQueryBuilder(Request $request)
405
    {
406
        $session = $request->getSession();
407
        if ($session->has('eccube.admin.product.search')) {
408
            $searchData = $session->get('eccube.admin.product.search');
409
            $this->findDeserializeObjects($searchData);
410
        } else {
411
            $searchData = array();
412
        }
413
414
        // 商品データのクエリビルダを構築.
415
        $qb = $this->productRepository
416
            ->getQueryBuilderBySearchDataForAdmin($searchData);
417
418
        return $qb;
419
    }
420
421
    /**
422
     * セッションでシリアライズされた Doctrine のオブジェクトを取得し直す.