Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
52 | 4 | public function toDateTime(DateTime $start = null) |
|
53 | { |
||
54 | 4 | $start = $this->getNewStartDate($start); |
|
55 | |||
56 | 4 | $end = parent::toDateTime($start); |
|
57 | |||
58 | 4 | if ($this->holidays) { |
|
59 | 1 | $span = new DateTimeSpan($start, $end); |
|
60 | 1 | $span = $this->holidays->extendDateTimeSpan($span); |
|
61 | |||
62 | 1 | return $span->getTo(); |
|
63 | } |
||
64 | |||
65 | 3 | return $end; |
|
66 | } |
||
67 | |||
76 |