Code Duplication    Length = 11-13 lines in 2 locations

src/Eccube/Repository/OrderRepository.php 2 locations

@@ 147-157 (lines=11) @@
144
        }
145
146
        // birth
147
        if (!empty($searchData['birth_start']) && $searchData['birth_start']) {
148
            if (!$joinedCustomer) {
149
                $qb->leftJoin('o.Customer', 'c');
150
                $joinedCustomer = true;
151
            }
152
153
            $date = $searchData['birth_start'];
154
            $qb
155
                ->andWhere('c.birth >= :birth_start')
156
                ->setParameter('birth_start', $date);
157
        }
158
        if (!empty($searchData['birth_end']) && $searchData['birth_end']) {
159
            if (!$joinedCustomer) {
160
                $qb->leftJoin('o.Customer', 'c');
@@ 158-170 (lines=13) @@
155
                ->andWhere('c.birth >= :birth_start')
156
                ->setParameter('birth_start', $date);
157
        }
158
        if (!empty($searchData['birth_end']) && $searchData['birth_end']) {
159
            if (!$joinedCustomer) {
160
                $qb->leftJoin('o.Customer', 'c');
161
                $joinedCustomer = true;
162
            }
163
164
            $date = clone $searchData['birth_end'];
165
            $date = $date
166
                ->modify('+1 days');
167
            $qb
168
                ->andWhere('c.birth < :birth_end')
169
                ->setParameter('birth_end', $date);
170
        }
171
172
        // sex
173
        if (!empty($searchData['sex']) && count($searchData['sex']) > 0) {