Code Duplication    Length = 11-11 lines in 2 locations

src/Eccube/Form/Type/Shopping/ShippingType.php 1 location

@@ 160-170 (lines=11) @@
157
                $deliveryDurations = [];
158
159
                // 配送日数が設定されている
160
                if ($deliveryDurationFlag) {
161
                    $period = new \DatePeriod(
162
                        new \DateTime($minDate.' day'),
163
                        new \DateInterval('P1D'),
164
                        new \DateTime($minDate + $this->eccubeConfig['eccube_deliv_date_end_max'].' day')
165
                    );
166
167
                    foreach ($period as $day) {
168
                        $deliveryDurations[$day->format('Y/m/d')] = $day->format('Y/m/d');
169
                    }
170
                }
171
172
                $form = $event->getForm();
173
                $form

src/Eccube/Service/ShoppingService.php 1 location

@@ 959-969 (lines=11) @@
956
        $deliveryDurations = [];
957
958
        // 配送日数が設定されている
959
        if ($deliveryDurationFlag) {
960
            $period = new \DatePeriod(
961
                new \DateTime($minDate.' day'),
962
                new \DateInterval('P1D'),
963
                new \DateTime($minDate + $this->eccubeConfig['eccube_deliv_date_end_max'].' day')
964
            );
965
966
            foreach ($period as $day) {
967
                $deliveryDurations[$day->format('Y/m/d')] = $day->format('Y/m/d');
968
            }
969
        }
970
971
        return $deliveryDurations;
972
    }