Code Duplication    Length = 15-15 lines in 2 locations

src/Booking/Strategies/BookingDateslotStrategy.php 1 location

@@ 28-42 (lines=15) @@
25
     *
26
     * @return array
27
     */
28
    public function buildTimetable($vacancies, $starting = 'today', $days = 1)
29
    {
30
        $this->timetable
31
             ->interval($this->interval)
32
             ->format('date.service.time')
33
             ->from($starting)
34
             ->future($days)
35
             ->init();
36
37
        foreach ($vacancies as $vacancy) {
38
            $this->updateTimeslots($vacancy, $this->interval);
39
        }
40
41
        return $this->timetable->get();
42
    }
43
44
    protected function updateTimeslots(Vacancy $vacancy, $step = 30)
45
    {

src/Booking/Strategies/BookingTimeslotStrategy.php 1 location

@@ 34-48 (lines=15) @@
31
     *
32
     * @return array
33
     */
34
    public function buildTimetable($vacancies, $starting = 'today', $days = 1)
35
    {
36
        $this->timetable
37
             ->interval($this->interval)
38
             ->format('date.service.time')
39
             ->from($starting)
40
             ->future($days)
41
             ->init();
42
43
        foreach ($vacancies as $vacancy) {
44
            $this->updateTimeslots($vacancy, $this->interval);
45
        }
46
47
        return $this->timetable->get();
48
    }
49
50
    protected function updateTimeslots(Vacancy $vacancy, $step = 30)
51
    {