Code Duplication    Length = 6-7 lines in 3 locations

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']) && $count = count($searchData['shipping_mail'])) {

src/Eccube/Repository/CustomerRepository.php 1 location

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