Code Duplication    Length = 7-8 lines in 3 locations

src/Eccube/Repository/OrderRepository.php 1 location

@@ 276-283 (lines=8) @@
273
                ->setParameter('order_id_start', $searchData['order_id_start']);
274
        }
275
        // multi
276
        if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
277
            $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null;
278
            $qb
279
                ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' .
280
                           'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti')
281
                ->setParameter('multi', $multi)
282
                ->setParameter('likemulti', '%' . $searchData['multi'] . '%');
283
        }
284
285
        // order_id_end
286
        if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) {

src/Eccube/Repository/ProductRepository.php 1 location

@@ 183-189 (lines=7) @@
180
            ->innerJoin('p.ProductClasses', 'pc');
181
182
        // id
183
        if (isset($searchData['id']) && Str::isNotBlank($searchData['id'])) {
184
            $id = preg_match('/^\d+$/', $searchData['id']) ? $searchData['id'] : null;
185
            $qb
186
                ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid')
187
                ->setParameter('id', $id)
188
                ->setParameter('likeid', '%' . $searchData['id'] . '%');
189
        }
190
191
        // code
192
        /*

src/Eccube/Repository/ShippingRepository.php 1 location

@@ 58-65 (lines=8) @@
55
                ->setParameter('shipping_id_start', $searchData['shipping_id_start']);
56
        }
57
        // multi
58
        if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) {
59
            $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null;
60
            $qb
61
                ->andWhere('s.id = :multi OR s.name01 LIKE :likemulti OR s.name02 LIKE :likemulti OR ' .
62
                           's.kana01 LIKE :likemulti OR s.kana02 LIKE :likemulti OR s.company_name LIKE :likemulti')
63
                ->setParameter('multi', $multi)
64
                ->setParameter('likemulti', '%' . $searchData['multi'] . '%');
65
        }
66
67
        // shipping_id_end
68
        if (isset($searchData['shipping_id_end']) && Str::isNotBlank($searchData['shipping_id_end'])) {