Code Duplication    Length = 10-10 lines in 3 locations

src/Eccube/Repository/OrderRepository.php 2 locations

@@ 177-186 (lines=10) @@
174
        }
175
176
        // payment
177
        if (!empty($searchData['payment']) && count($searchData['payment'])) {
178
            $payments = [];
179
            foreach ($searchData['payment'] as $payment) {
180
                $payments[] = $payment->getId();
181
            }
182
            $qb
183
                ->leftJoin('o.Payment', 'p')
184
                ->andWhere($qb->expr()->in('p.id', ':payments'))
185
                ->setParameter('payments', $payments);
186
        }
187
188
        // oreder_date
189
        if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) {
@@ 357-366 (lines=10) @@
354
        }
355
356
        // payment
357
        if (!empty($searchData['payment']) && count($searchData['payment'])) {
358
            $payments = [];
359
            foreach ($searchData['payment'] as $payment) {
360
                $payments[] = $payment->getId();
361
            }
362
            $qb
363
                ->leftJoin('o.Payment', 'p')
364
                ->andWhere($qb->expr()->in('p.id', ':payments'))
365
                ->setParameter('payments', $payments);
366
        }
367
368
        // oreder_date
369
        if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) {

src/Eccube/Repository/ShippingRepository.php 1 location

@@ 135-144 (lines=10) @@
132
        }
133
134
        // payment
135
        if (!empty($searchData['payment']) && count($searchData['payment'])) {
136
            $payments = [];
137
            foreach ($searchData['payment'] as $payment) {
138
                $payments[] = $payment->getId();
139
            }
140
            $qb
141
                ->leftJoin('o.Payment', 'p')
142
                ->andWhere($qb->expr()->in('p.id', ':payments'))
143
                ->setParameter('payments', $payments);
144
        }
145
146
        // oreder_date
147
        if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) {