Code Duplication    Length = 11-13 lines in 2 locations

src/Eccube/Repository/OrderRepository.php 2 locations

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