Code Duplication    Length = 12-12 lines in 2 locations

src/Calendar/DateslotCalendar.php 1 location

@@ 21-32 (lines=12) @@
18
        return $results;
19
    }
20
21
    protected function prepare()
22
    {
23
        if ($this->service !== null) {
24
            $this->vacancies->forService($this->service);
25
        }
26
27
        if ($this->date !== null) {
28
            $this->vacancies->forDate($this->date());
29
        }
30
31
        return $this;
32
    }
33
}
34

src/Calendar/TimeslotCalendar.php 1 location

@@ 26-37 (lines=12) @@
23
        return $results;
24
    }
25
26
    protected function prepare()
27
    {
28
        if ($this->service !== null) {
29
            $this->vacancies->forService($this->service);
30
        }
31
32
        if ($this->date !== null && $this->time !== null) {
33
            $this->vacancies->forDateTime($this->getUTCDateTime());
34
        }
35
36
        return $this;
37
    }
38
}
39