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

@@ 978-988 (lines=11) @@
975
        $deliveryDurations = [];
976
977
        // 配送日数が設定されている
978
        if ($deliveryDurationFlag) {
979
            $period = new \DatePeriod(
980
                new \DateTime($minDate.' day'),
981
                new \DateInterval('P1D'),
982
                new \DateTime($minDate + $this->eccubeConfig['eccube_deliv_date_end_max'].' day')
983
            );
984
985
            foreach ($period as $day) {
986
                $deliveryDurations[$day->format('Y/m/d')] = $day->format('Y/m/d');
987
            }
988
        }
989
990
        return $deliveryDurations;
991
    }