Code Duplication    Length = 10-11 lines in 2 locations

src/Eccube/Repository/ProductRepository.php 2 locations

@@ 96-106 (lines=11) @@
93
94
        // category
95
        $categoryJoin = false;
96
        if (!empty($searchData['category_id']) && $searchData['category_id']) {
97
            $Categories = $searchData['category_id']->getSelfAndDescendants();
98
            if ($Categories) {
99
                $qb
100
                    ->innerJoin('p.ProductCategories', 'pct')
101
                    ->innerJoin('pct.Category', 'c')
102
                    ->andWhere($qb->expr()->in('pct.Category', ':Categories'))
103
                    ->setParameter('Categories', $Categories);
104
                $categoryJoin = true;
105
            }
106
        }
107
108
        // name
109
        if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) {
@@ 198-207 (lines=10) @@
195
       */
196
197
        // category
198
        if (!empty($searchData['category_id']) && $searchData['category_id']) {
199
            $Categories = $searchData['category_id']->getSelfAndDescendants();
200
            if ($Categories) {
201
                $qb
202
                    ->innerJoin('p.ProductCategories', 'pct')
203
                    ->innerJoin('pct.Category', 'c')
204
                    ->andWhere($qb->expr()->in('pct.Category', ':Categories'))
205
                    ->setParameter('Categories', $Categories);
206
            }
207
        }
208
209
        // status
210
        if (!empty($searchData['status']) && $searchData['status']->toArray()) {