Code Duplication    Length = 11-13 lines in 2 locations

src/Eccube/Repository/OrderRepository.php 2 locations

@@ 131-141 (lines=11) @@
128
        }
129
130
        // birth
131
        if (!empty($searchData['birth_start']) && $searchData['birth_start']) {
132
            if (!$joinedCustomer) {
133
                $qb->leftJoin('o.Customer', 'c');
134
                $joinedCustomer = true;
135
            }
136
137
            $date = $searchData['birth_start'];
138
            $qb
139
                ->andWhere('c.birth >= :birth_start')
140
                ->setParameter('birth_start', $date);
141
        }
142
        if (!empty($searchData['birth_end']) && $searchData['birth_end']) {
143
            if (!$joinedCustomer) {
144
                $qb->leftJoin('o.Customer', 'c');
@@ 142-154 (lines=13) @@
139
                ->andWhere('c.birth >= :birth_start')
140
                ->setParameter('birth_start', $date);
141
        }
142
        if (!empty($searchData['birth_end']) && $searchData['birth_end']) {
143
            if (!$joinedCustomer) {
144
                $qb->leftJoin('o.Customer', 'c');
145
                $joinedCustomer = true;
146
            }
147
148
            $date = clone $searchData['birth_end'];
149
            $date = $date
150
                ->modify('+1 days');
151
            $qb
152
                ->andWhere('c.birth < :birth_end')
153
                ->setParameter('birth_end', $date);
154
        }
155
156
        // sex
157
        if (!empty($searchData['sex']) && count($searchData['sex']) > 0) {