Code Duplication    Length = 10-10 lines in 3 locations

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']) {

src/Eccube/Repository/OrderRepository.php 2 locations

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