@@ -47,7 +47,7 @@ |
||
47 | 47 | $split_start_date = clone($new_end_date)->add(new \DateInterval('P1D')); |
48 | 48 | $split_end_date = $end_date; |
49 | 49 | |
50 | - $split_constraint = new MinMaxDaysConstraint($constraint->getUnits(), $constraint->getMinDays(), $constraint->getMaxDays(), $split_start_date, $split_end_date , $constraint->getCheckinDay()); |
|
50 | + $split_constraint = new MinMaxDaysConstraint($constraint->getUnits(), $constraint->getMinDays(), $constraint->getMaxDays(), $split_start_date, $split_end_date, $constraint->getCheckinDay()); |
|
51 | 51 | } |
52 | 52 | else { |
53 | 53 | $split_start_date = $split_constraint->getStartDate(); |
@@ -34,11 +34,9 @@ discard block |
||
34 | 34 | ($constraint->getMaxDays() && $new_constraint->getMaxDays())) { |
35 | 35 | if ($start_date >= $new_start_date && $start_date <= $new_end_date) { |
36 | 36 | $constraint->setStartDate(clone($new_end_date)->add(new \DateInterval('P1D'))); |
37 | - } |
|
38 | - elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) { |
|
37 | + } elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) { |
|
39 | 38 | $constraint->setEndDate(clone($new_start_date)->sub(new \DateInterval('P1D'))); |
40 | - } |
|
41 | - elseif ($start_date < $new_start_date && $end_date > $new_end_date) { |
|
39 | + } elseif ($start_date < $new_start_date && $end_date > $new_end_date) { |
|
42 | 40 | if ($constraint->getEndDate() > $new_start_date) { |
43 | 41 | $constraint->setEndDate(clone($new_start_date)->sub(new \DateInterval('P1D'))); |
44 | 42 | } |
@@ -48,8 +46,7 @@ discard block |
||
48 | 46 | $split_end_date = $end_date; |
49 | 47 | |
50 | 48 | $split_constraint = new MinMaxDaysConstraint($constraint->getUnits(), $constraint->getMinDays(), $constraint->getMaxDays(), $split_start_date, $split_end_date , $constraint->getCheckinDay()); |
51 | - } |
|
52 | - else { |
|
49 | + } else { |
|
53 | 50 | $split_start_date = $split_constraint->getStartDate(); |
54 | 51 | $split_end_date = $split_constraint->getEndDate(); |
55 | 52 |