@@ -147,8 +147,7 @@ discard block |
||
| 147 | 147 | // If we are in the same month the end date is the end date of the event |
| 148 | 148 | if ($this->event->isSameMonth()) { |
| 149 | 149 | $dayrange = new \DatePeriod($this->event->getStartDate(), $dayinterval, new \DateTime($this->event->getEndDate()->format("Y-n-j 23:59:59"))); |
| 150 | - } |
|
| 151 | - else { // alternatively it is the last day of the start month |
|
| 150 | + } else { // alternatively it is the last day of the start month |
|
| 152 | 151 | $dayrange = new \DatePeriod($this->event->getStartDate(), $dayinterval, $this->event->endMonthDate($this->event->getStartDate())); |
| 153 | 152 | } |
| 154 | 153 | foreach ($dayrange as $day) { |
@@ -214,8 +213,7 @@ discard block |
||
| 214 | 213 | $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd]; |
| 215 | 214 | $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd]; |
| 216 | 215 | } |
| 217 | - } |
|
| 218 | - else { |
|
| 216 | + } else { |
|
| 219 | 217 | // Deal with the start day unless it starts on midnight precisely at which point the whole day is booked |
| 220 | 218 | if (!($this->event->getStartDate()->format('H:i') == '00:00')) { |
| 221 | 219 | $start_period = new \DatePeriod($start_date, $interval, new \DateTime($start_date->format("Y-n-j 23:59:59"))); |
@@ -223,8 +221,7 @@ discard block |
||
| 223 | 221 | $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d' . $sd] = -1; |
| 224 | 222 | $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd]; |
| 225 | 223 | $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd]; |
| 226 | - } |
|
| 227 | - else { |
|
| 224 | + } else { |
|
| 228 | 225 | // Just set an empty hour and minute |
| 229 | 226 | $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = array(); |
| 230 | 227 | $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = array(); |
@@ -270,8 +267,7 @@ discard block |
||
| 270 | 267 | // Not a real hour - leave as is and move on |
| 271 | 268 | $counter = 0; |
| 272 | 269 | $start_minute = 0; |
| 273 | - } |
|
| 274 | - elseif ($counter == 60 && $start_minute == 0) { |
|
| 270 | + } elseif ($counter == 60 && $start_minute == 0) { |
|
| 275 | 271 | // Did a real whole hour so initialize the hour |
| 276 | 272 | $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = $this->event->getValue(); |
| 277 | 273 | // We have a whole hour so get rid of the minute info |
@@ -342,8 +342,7 @@ |
||
| 342 | 342 | if ($this->dateIsEarlier($start) && |
| 343 | 343 | ($this->dateIsInRange($end) || $this->dateIsLater($end))) { |
| 344 | 344 | $overlaps = TRUE; |
| 345 | - } |
|
| 346 | - elseif ($this->dateIsInRange($start) && |
|
| 345 | + } elseif ($this->dateIsInRange($start) && |
|
| 347 | 346 | ($this->dateIsInRange($end) || $this->dateIsLater($end))) { |
| 348 | 347 | $overlaps = TRUE; |
| 349 | 348 | } |