Code Duplication    Length = 10-10 lines in 3 locations

src/Eccube/Repository/ShippingRepository.php 1 location

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

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']) {
@@ 355-364 (lines=10) @@
352
        }
353
354
        // payment
355
        if (!empty($searchData['payment']) && count($searchData['payment'])) {
356
            $payments = [];
357
            foreach ($searchData['payment'] as $payment) {
358
                $payments[] = $payment->getId();
359
            }
360
            $qb
361
                ->leftJoin('o.Payment', 'p')
362
                ->andWhere($qb->expr()->in('p.id', ':payments'))
363
                ->setParameter('payments', $payments);
364
        }
365
366
        // oreder_date
367
        if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) {