Code Duplication    Length = 10-11 lines in 2 locations

src/Eccube/Repository/ProductRepository.php 2 locations

@@ 101-111 (lines=11) @@
98
99
        // category
100
        $categoryJoin = false;
101
        if (!empty($searchData['category_id']) && $searchData['category_id']) {
102
            $Categories = $searchData['category_id']->getSelfAndDescendants();
103
            if ($Categories) {
104
                $qb
105
                    ->innerJoin('p.ProductCategories', 'pct')
106
                    ->innerJoin('pct.Category', 'c')
107
                    ->andWhere($qb->expr()->in('pct.Category', ':Categories'))
108
                    ->setParameter('Categories', $Categories);
109
                $categoryJoin = true;
110
            }
111
        }
112
113
        // name
114
        if (isset($searchData['name']) && StringUtil::isNotBlank($searchData['name'])) {
@@ 212-221 (lines=10) @@
209
       */
210
211
        // category
212
        if (!empty($searchData['category_id']) && $searchData['category_id']) {
213
            $Categories = $searchData['category_id']->getSelfAndDescendants();
214
            if ($Categories) {
215
                $qb
216
                    ->innerJoin('p.ProductCategories', 'pct')
217
                    ->innerJoin('pct.Category', 'c')
218
                    ->andWhere($qb->expr()->in('pct.Category', ':Categories'))
219
                    ->setParameter('Categories', $Categories);
220
            }
221
        }
222
223
        // status
224
        if (!empty($searchData['status']) && $searchData['status']) {