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

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