@@ -115,12 +115,10 @@ discard block |
||
115 | 115 | if ($start_date >= $new_start_date && $start_date <= $new_end_date) { |
116 | 116 | $new_end_date_clone = clone($new_end_date); |
117 | 117 | $constraint->setStartDate($new_end_date_clone->add(new \DateInterval('P1D'))); |
118 | - } |
|
119 | - elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) { |
|
118 | + } elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) { |
|
120 | 119 | $new_start_date_clone = clone($new_start_date); |
121 | 120 | $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D'))); |
122 | - } |
|
123 | - elseif ($start_date < $new_start_date && $end_date > $new_end_date) { |
|
121 | + } elseif ($start_date < $new_start_date && $end_date > $new_end_date) { |
|
124 | 122 | if ($constraint->getEndDate() > $new_start_date) { |
125 | 123 | $new_start_date_clone = clone($new_start_date); |
126 | 124 | $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D'))); |
@@ -132,8 +130,7 @@ discard block |
||
132 | 130 | $split_end_date = $end_date; |
133 | 131 | |
134 | 132 | $split_constraint = new MinMaxDaysConstraint($constraint->getUnits(), $constraint->getMinDays(), $constraint->getMaxDays(), $split_start_date, $split_end_date, $constraint->getCheckinDay()); |
135 | - } |
|
136 | - else { |
|
133 | + } else { |
|
137 | 134 | $split_start_date = $split_constraint->getStartDate(); |
138 | 135 | $split_end_date = $split_constraint->getEndDate(); |
139 | 136 |