Code Duplication    Length = 6-7 lines in 3 locations

src/Eccube/Repository/CustomerRepository.php 1 location

@@ 236-242 (lines=7) @@
233
        }
234
235
        // buy_product_name
236
        if (isset($searchData['buy_product_name']) && StringUtil::isNotBlank($searchData['buy_product_name'])) {
237
            $qb
238
                ->leftJoin('c.Orders', 'o')
239
                ->leftJoin('o.OrderItems', 'oi')
240
                ->andWhere('oi.product_name LIKE :buy_product_name')
241
                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
242
        }
243
244
        // Order By
245
        $qb->addOrderBy('c.update_date', 'DESC');

src/Eccube/Repository/OrderRepository.php 2 locations

@@ 233-238 (lines=6) @@
230
        }
231
232
        // buy_product_name
233
        if (isset($searchData['buy_product_name']) && StringUtil::isNotBlank($searchData['buy_product_name'])) {
234
            $qb
235
                ->leftJoin('o.OrderItems', 'oi')
236
                ->andWhere('oi.product_name LIKE :buy_product_name')
237
                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
238
        }
239
240
        // Order By
241
        $qb->addOrderBy('o.update_date', 'DESC');
@@ 429-434 (lines=6) @@
426
        }
427
428
        // buy_product_name
429
        if (isset($searchData['buy_product_name']) && StringUtil::isNotBlank($searchData['buy_product_name'])) {
430
            $qb
431
                ->leftJoin('o.OrderItems', 'oi')
432
                ->andWhere('oi.product_name LIKE :buy_product_name')
433
                ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%');
434
        }
435
436
        // 発送メール送信済かどうか.
437
        if (isset($searchData['shipping_mail_send']) && $searchData['shipping_mail_send']) {