Code Duplication    Length = 11-13 lines in 2 locations

src/Eccube/Repository/OrderRepository.php 2 locations

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