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

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