@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | $start = TRUE; |
135 | 135 | |
136 | 136 | // Cycle through each month |
137 | - foreach($daterange as $date) { |
|
137 | + foreach ($daterange as $date) { |
|
138 | 138 | |
139 | 139 | // Check if we have |
140 | - if (($date->format('Y-n') != $old_month) || ($start)) { |
|
140 | + if (($date->format('Y-n') != $old_month) || ($start)) { |
|
141 | 141 | |
142 | 142 | $year = $date->format("Y"); |
143 | 143 | $dayinterval = new \DateInterval('P1D'); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | // Deal with the end date unless it ends just before midnight at which point we don't need to go further |
234 | - if ($this->event->getEndDate()->format('H:i') == '23:59' ) { |
|
234 | + if ($this->event->getEndDate()->format('H:i') == '23:59') { |
|
235 | 235 | $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = array(); |
236 | 236 | $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = array(); |
237 | 237 | } else { |
@@ -259,14 +259,14 @@ discard block |
||
259 | 259 | |
260 | 260 | $counter = (int)$period_start->format('i'); |
261 | 261 | $start_minute = $counter; |
262 | - foreach($period as $minute) { |
|
262 | + foreach ($period as $minute) { |
|
263 | 263 | // Doing minutes so set the values in the minute array |
264 | - $itemized[EventItemizer::BAT_MINUTE][$minute->format('Y')][$minute->format('n')]['d'. $minute->format('j')]['h'. $minute->format('G')]['m' .$minute->format('i')] = $this->event->getValue(); |
|
264 | + $itemized[EventItemizer::BAT_MINUTE][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')]['m' . $minute->format('i')] = $this->event->getValue(); |
|
265 | 265 | // Let the hours know that it cannot determine availability |
266 | - $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d'. $minute->format('j')]['h'. $minute->format('G')] = -1; |
|
266 | + $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = -1; |
|
267 | 267 | $counter++; |
268 | 268 | |
269 | - if ($counter == 60 && $start_minute!==0) { |
|
269 | + if ($counter == 60 && $start_minute !== 0) { |
|
270 | 270 | // Not a real hour - leave as is and move on |
271 | 271 | $counter = 0; |
272 | 272 | $start_minute = 0; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | // Did a real whole hour so initialize the hour |
276 | 276 | $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = $this->event->getValue(); |
277 | 277 | // We have a whole hour so get rid of the minute info |
278 | - unset($itemized[EventItemizer::BAT_MINUTE][$minute->format('Y')][$minute->format('n')]['d'. $minute->format('j')]['h'. $minute->format('G')]); |
|
278 | + unset($itemized[EventItemizer::BAT_MINUTE][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')]); |
|
279 | 279 | $counter = 0; |
280 | 280 | $start_minute = 0; |
281 | 281 | } |