GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#15)
by
unknown
06:04
created
src/Constraint/ConstraintInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
    *
20 20
    * @param $calendar_response
21 21
    */
22
-  public function applyConstraint(CalendarResponse &$calendar_response);
22
+  public function applyConstraint(CalendarResponse & $calendar_response);
23 23
 
24 24
   /**
25 25
    * @param $start_date
Please login to merge, or discard this patch.
src/Constraint/AbstractConstraint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
   /**
112 112
    * {@inheritdoc}
113 113
    */
114
-  public function applyConstraint(CalendarResponse &$calendar_response) {
114
+  public function applyConstraint(CalendarResponse & $calendar_response) {
115 115
     $this->calendar_response = $calendar_response;
116 116
   }
117 117
 
Please login to merge, or discard this patch.
src/Store/SqlLiteDBStore.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@
 block discarded – undo
108 108
             $command = rtrim($command, ',');
109 109
             $command .= " WHERE unit_id = " . $event->getUnitId() . " AND year = $year AND month = $month";
110 110
             $this->pdo->exec($command);
111
-          }
112
-          else {
111
+          } else {
113 112
             $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, " . implode(', ', $keys) . ") VALUES (" . $event->getUnitId() . ", $year, $month, " . implode(', ', $values) . ")");
114 113
           }
115 114
         }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
     // Cycle through day results and setup an event array
49 49
     foreach ($results[Event::BAT_DAY]->fetchAll() as $data) {
50 50
       // Figure out how many days the current month has
51
-      $temp_date = new \DateTime($data['year'] . "-" . $data['month']);
51
+      $temp_date = new \DateTime($data['year']."-".$data['month']);
52 52
       $days_in_month = (int)$temp_date->format('t');
53 53
       for ($i = 1; $i <= $days_in_month; $i++) {
54
-        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d' . $i];
54
+        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d'.$i] = $data['d'.$i];
55 55
       }
56 56
     }
57 57
 
58 58
     // With the day events taken care off let's cycle through hours
59 59
     foreach ($results[Event::BAT_HOUR]->fetchAll() as $data) {
60 60
       for ($i = 0; $i <= 23; $i++) {
61
-        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d' . $data['day']]['h' . $i] = $data['h' . $i];
61
+        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d'.$data['day']]['h'.$i] = $data['h'.$i];
62 62
       }
63 63
     }
64 64
 
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     foreach ($results[Event::BAT_MINUTE]->fetchAll() as $data) {
67 67
       for ($i = 0; $i <= 59; $i++) {
68 68
         if ($i <= 9) {
69
-          $index = 'm0' . $i;
69
+          $index = 'm0'.$i;
70 70
         } else {
71
-          $index = 'm' . $i;
71
+          $index = 'm'.$i;
72 72
         }
73
-        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d' . $data['day']]['h' . $data['hour']][$index] = $data[$index];
73
+        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d'.$data['day']]['h'.$data['hour']][$index] = $data[$index];
74 74
       }
75 75
     }
76 76
 
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
               $command .= "$day = $value,";
106 106
             }
107 107
             $command = rtrim($command, ',');
108
-            $command .= " WHERE unit_id = " . $event->getUnitId() . " AND year = $year AND month = $month";
108
+            $command .= " WHERE unit_id = ".$event->getUnitId()." AND year = $year AND month = $month";
109 109
             $this->pdo->exec($command);
110 110
           }
111 111
           else {
112
-            $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, " . implode(', ', $keys) . ") VALUES (" . $event->getUnitId() . ", $year, $month, " . implode(', ', $values) . ")");
112
+            $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, ".implode(', ', $keys).") VALUES (".$event->getUnitId().", $year, $month, ".implode(', ', $values).")");
113 113
           }
114 114
         }
115 115
       }
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
                 $keys = array_keys($hours);
126 126
                 if (isset($existing_events[$event->getUnitId()][EVENT::BAT_HOUR][$year][$month][$day])) {
127 127
                   $command = "UPDATE $this->hour_table SET ";
128
-                  foreach ($hours as $hour => $value){
128
+                  foreach ($hours as $hour => $value) {
129 129
                     $command .= "$hour = $value,";
130 130
                   }
131 131
                   $command = rtrim($command, ',');
132
-                  $command .= " WHERE unit_id = " . $event->getUnitId() . " AND year = $year AND month = $month AND day = " . substr($day,1);
132
+                  $command .= " WHERE unit_id = ".$event->getUnitId()." AND year = $year AND month = $month AND day = ".substr($day, 1);
133 133
                   $this->pdo->exec($command);
134 134
                 } else {
135
-                  $this->pdo->exec("INSERT INTO $this->hour_table (unit_id, year, month, day, " . implode(', ', $keys) . ") VALUES (" . $event->getUnitId() . ", $year, $month, " . substr($day, 1) . ", " . implode(', ', $values) . ")");
135
+                  $this->pdo->exec("INSERT INTO $this->hour_table (unit_id, year, month, day, ".implode(', ', $keys).") VALUES (".$event->getUnitId().", $year, $month, ".substr($day, 1).", ".implode(', ', $values).")");
136 136
                 }
137 137
               }
138 138
             }
@@ -148,14 +148,14 @@  discard block
 block discarded – undo
148 148
                 $keys = array_keys($minutes);
149 149
                 if (isset($existing_events[$event->getUnitId()][EVENT::BAT_MINUTE][$year][$month][$day][$hour])) {
150 150
                   $command = "UPDATE $this->minute_table SET ";
151
-                  foreach ($minutes as $minute => $value){
151
+                  foreach ($minutes as $minute => $value) {
152 152
                     $command .= "$minute = $value,";
153 153
                   }
154 154
                   $command = rtrim($command, ',');
155
-                  $command .= " WHERE unit_id = " . $event->getUnitId() . " AND year = $year AND month = $month AND day = " . substr($day,1) . " AND hour = " . substr($hour,1);
155
+                  $command .= " WHERE unit_id = ".$event->getUnitId()." AND year = $year AND month = $month AND day = ".substr($day, 1)." AND hour = ".substr($hour, 1);
156 156
                   $this->pdo->exec($command);
157 157
                 } else {
158
-                  $this->pdo->exec("INSERT INTO $this->minute_table (unit_id, year, month, day, hour, " . implode(', ', $keys) . ") VALUES (" . $event->getUnitId() . ", $year, $month, " . substr($day, 1) . ", " . substr($hour, 1) . ", " . implode(', ', $values) . ")");
158
+                  $this->pdo->exec("INSERT INTO $this->minute_table (unit_id, year, month, day, hour, ".implode(', ', $keys).") VALUES (".$event->getUnitId().", $year, $month, ".substr($day, 1).", ".substr($hour, 1).", ".implode(', ', $values).")");
159 159
                 }
160 160
               }
161 161
             }
Please login to merge, or discard this patch.
src/Event/AbstractEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
    * @return int
63 63
    */
64 64
   public function getValue() {
65
-    return (int) $this->value;
65
+    return (int)$this->value;
66 66
   }
67 67
 
68 68
   /**
Please login to merge, or discard this patch.
src/Unit/AbstractUnit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
    * {@inheritdoc}
45 45
    */
46 46
   public function getDefaultValue() {
47
-    return (int) $this->default_value;
47
+    return (int)$this->default_value;
48 48
   }
49 49
 
50 50
   /**
Please login to merge, or discard this patch.
src/Constraint/CheckInDayConstraint.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
   /**
36 36
    * {@inheritdoc}
37 37
    */
38
-  public function applyConstraint(CalendarResponse &$calendar_response) {
38
+  public function applyConstraint(CalendarResponse & $calendar_response) {
39 39
     parent::applyConstraint($calendar_response);
40 40
 
41 41
     if ($this->start_date === NULL) {
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
       $this->end_date = new \DateTime('2999-12-31');
46 46
     }
47 47
 
48
-    if ( (($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() &&
48
+    if ((($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() &&
49 49
            $calendar_response->getStartDate()->getTimestamp() <= $this->end_date->getTimestamp()) ||
50 50
           ($calendar_response->getStartDate()->getTimestamp() <= $this->start_date->getTimestamp() &&
51 51
            $calendar_response->getEndDate()->getTimestamp() >= $this->end_date->getTimestamp())) &&
52
-         $this->checkin_day != $calendar_response->getStartDate()->format('N') ) {
52
+         $this->checkin_day != $calendar_response->getStartDate()->format('N')) {
53 53
 
54 54
       $units = $this->getUnits();
55 55
 
Please login to merge, or discard this patch.
src/Constraint/MinMaxDaysConstraint.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
   /**
53 53
    * {@inheritdoc}
54 54
    */
55
-  public function applyConstraint(CalendarResponse &$calendar_response) {
55
+  public function applyConstraint(CalendarResponse & $calendar_response) {
56 56
     parent::applyConstraint($calendar_response);
57 57
 
58 58
     if ($this->start_date === NULL) {
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
       $this->end_date = new \DateTime('2999-12-31');
63 63
     }
64 64
 
65
-    if ( (($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() &&
65
+    if ((($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() &&
66 66
            $calendar_response->getStartDate()->getTimestamp() <= $this->end_date->getTimestamp()) ||
67 67
           ($calendar_response->getEndDate()->getTimestamp() >= $this->start_date->getTimestamp() &&
68 68
            $calendar_response->getEndDate()->getTimestamp() <= $this->end_date->getTimestamp()) ||
69 69
           ($calendar_response->getStartDate()->getTimestamp() <= $this->start_date->getTimestamp() &&
70 70
            $calendar_response->getEndDate()->getTimestamp() >= $this->end_date->getTimestamp())) &&
71
-         ($this->checkin_day === NULL || $this->checkin_day == $calendar_response->getStartDate()->format('N')) ) {
71
+         ($this->checkin_day === NULL || $this->checkin_day == $calendar_response->getStartDate()->format('N'))) {
72 72
 
73 73
       $units = $this->getUnits();
74 74
 
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
     $text = '';
108 108
 
109 109
     // Min/max stay length constraint variables.
110
-    $minimum_stay = empty($this->min_days) ? '' : (($this->min_days == 1) ? $this->min_days . ' day' : $this->min_days . ' days');
111
-    $maximum_stay = empty($this->max_days) ? '' : (($this->max_days == 1) ? $this->max_days . ' day' : $this->max_days . ' days');
110
+    $minimum_stay = empty($this->min_days) ? '' : (($this->min_days == 1) ? $this->min_days.' day' : $this->min_days.' days');
111
+    $maximum_stay = empty($this->max_days) ? '' : (($this->max_days == 1) ? $this->max_days.' day' : $this->max_days.' days');
112 112
 
113 113
     // Day of the week constraint variable.
114 114
     $day_of_the_week = $this->getWeekDay($this->checkin_day);
Please login to merge, or discard this patch.
src/Store/DrupalDBStore.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
    */
28 28
   public function getEventData(\DateTime $start_date, \DateTime $end_date, $unit_ids) {
29 29
 
30
-    $queries  = $this->buildQueries($start_date, $end_date, $unit_ids);
30
+    $queries = $this->buildQueries($start_date, $end_date, $unit_ids);
31 31
 
32 32
     $results = array();
33 33
     // Run each query and store results
@@ -38,31 +38,31 @@  discard block
 block discarded – undo
38 38
     $db_events = array();
39 39
 
40 40
     // Cycle through day results and setup an event array
41
-    while( $data = $results[Event::BAT_DAY]->fetchAssoc()) {
41
+    while ($data = $results[Event::BAT_DAY]->fetchAssoc()) {
42 42
       // Figure out how many days the current month has
43
-      $temp_date = new \DateTime($data['year'] . "-" . $data['month']);
43
+      $temp_date = new \DateTime($data['year']."-".$data['month']);
44 44
       $days_in_month = (int)$temp_date->format('t');
45
-      for ($i = 1; $i<=$days_in_month; $i++) {
46
-        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d'.$i];
45
+      for ($i = 1; $i <= $days_in_month; $i++) {
46
+        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d'.$i] = $data['d'.$i];
47 47
       }
48 48
     }
49 49
 
50 50
     // With the day events taken care off let's cycle through hours
51
-    while( $data = $results[Event::BAT_HOUR]->fetchAssoc()) {
52
-      for ($i = 0; $i<=23; $i++) {
53
-        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d' . $data['day']]['h'. $i] = $data['h'.$i];
51
+    while ($data = $results[Event::BAT_HOUR]->fetchAssoc()) {
52
+      for ($i = 0; $i <= 23; $i++) {
53
+        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d'.$data['day']]['h'.$i] = $data['h'.$i];
54 54
       }
55 55
     }
56 56
 
57 57
     // With the hour events taken care off let's cycle through minutes
58
-    while( $data = $results[Event::BAT_MINUTE]->fetchAssoc()) {
59
-      for ($i = 0; $i<=59; $i++) {
58
+    while ($data = $results[Event::BAT_MINUTE]->fetchAssoc()) {
59
+      for ($i = 0; $i <= 59; $i++) {
60 60
         if ($i <= 9) {
61 61
           $index = 'm0'.$i;
62 62
         } else {
63 63
           $index = 'm'.$i;
64 64
         }
65
-        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d' . $data['day']]['h' . $data['hour']][$index] = $data[$index];
65
+        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d'.$data['day']]['h'.$data['hour']][$index] = $data[$index];
66 66
       }
67 67
     }
68 68
 
Please login to merge, or discard this patch.
src/Event/EventItemizer.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -129,8 +129,7 @@  discard block
 block discarded – undo
129 129
     // We add a minute to compensate
130 130
     elseif (($this->event->getStartDate()->format('Y-m-d H:i') == $this->event->getEndDate()->format('Y-m-d H:i')) && $this->granularity == EventItemizer::BAT_DAILY) {
131 131
       $adjusted_end_day = new \DateTime($this->event->getEndDate()->add(new \DateInterval('PT1M'))->format('Y-m-d H:i'));
132
-    }
133
-    else {
132
+    } else {
134 133
       $adjusted_end_day = new \DateTime($this->event->getEndDate()->format('Y-m-d H:i'));
135 134
     }
136 135
 
@@ -222,8 +221,7 @@  discard block
 block discarded – undo
222 221
         $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd];
223 222
         $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd];
224 223
       }
225
-    }
226
-    else {
224
+    } else {
227 225
       // Deal with the start day unless it starts on midnight precisely at which point the whole day is booked
228 226
       if (!($this->event->getStartDate()->format('H:i') == '00:00')) {
229 227
         $start_period = new \DatePeriod($start_date, $interval, new \DateTime($start_date->format("Y-n-j 23:59:59")));
@@ -231,8 +229,7 @@  discard block
 block discarded – undo
231 229
         $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d' . $sd] = -1;
232 230
         $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd];
233 231
         $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd];
234
-      }
235
-      else {
232
+      } else {
236 233
         // Just set an empty hour and minute
237 234
         $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = array();
238 235
         $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = array();
@@ -242,8 +239,7 @@  discard block
 block discarded – undo
242 239
       if ($this->event->getEndDate()->format('H:i') == '23:59') {
243 240
         $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = array();
244 241
         $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = array();
245
-      }
246
-      else {
242
+      } else {
247 243
         $end_period = new \DatePeriod(new \DateTime($end_date->format("Y-n-j 00:00:00")), $interval, $end_date->add(new \DateInterval('PT1M')));
248 244
         $itemized_end = $this->createHourlyGranular($end_period, new \DateTime($end_date->format("Y-n-j 00:00:00")));
249 245
         $itemized[EventItemizer::BAT_DAY][$ey][$em]['d' . $ed] = -1;
@@ -279,8 +275,7 @@  discard block
 block discarded – undo
279 275
         // Not a real hour - leave as is and move on
280 276
         $counter = 0;
281 277
         $start_minute = 0;
282
-      }
283
-      elseif ($counter == 60 && $start_minute == 0) {
278
+      } elseif ($counter == 60 && $start_minute == 0) {
284 279
         // Did a real whole hour so initialize the hour
285 280
         $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = $this->event->getValue();
286 281
 
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $dayrange = new \DatePeriod($this->event->getStartDate(), $dayinterval, $this->event->endMonthDate($this->event->getStartDate()));
161 161
           }
162 162
           foreach ($dayrange as $day) {
163
-            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d' . $day->format('j')] = $this->event->getValue();
163
+            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d'.$day->format('j')] = $this->event->getValue();
164 164
           }
165 165
         }
166 166
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         elseif ($this->event->isLastMonth($date)) {
169 169
           $dayrange = new \DatePeriod(new \DateTime($date->format("Y-n-1")), $dayinterval, $this->event->getEndDate());
170 170
           foreach ($dayrange as $day) {
171
-            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d' . $day->format('j')] = $this->event->getValue();
171
+            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d'.$day->format('j')] = $this->event->getValue();
172 172
           }
173 173
         }
174 174
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         else {
177 177
           $dayrange = new \DatePeriod(new \DateTime($date->format("Y-n-1")), $dayinterval, new \DateTime($date->format("Y-n-t 23:59:59")));
178 178
           foreach ($dayrange as $day) {
179
-            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d' . $day->format('j')] = $this->event->getValue();
179
+            $itemized[EventItemizer::BAT_DAY][$year][$day->format('n')]['d'.$day->format('j')] = $this->event->getValue();
180 180
           }
181 181
         }
182 182
       }
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
       if (!($this->event->getStartDate()->format('H:i') == '00:00' && $this->event->getEndDate()->format('H:i') == '23:59')) {
219 219
         $period = new \DatePeriod($start_date, $interval, $end_date->add(new \DateInterval('PT1M')));
220 220
         $itemized_same_day = $this->createHourlyGranular($period, $start_date);
221
-        $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d' . $sd] = -1;
222
-        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd];
223
-        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_same_day[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd];
221
+        $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d'.$sd] = -1;
222
+        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d'.$sd] = $itemized_same_day[EventItemizer::BAT_HOUR][$sy][$sm]['d'.$sd];
223
+        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d'.$sd] = $itemized_same_day[EventItemizer::BAT_MINUTE][$sy][$sm]['d'.$sd];
224 224
       }
225 225
     }
226 226
     else {
@@ -228,27 +228,27 @@  discard block
 block discarded – undo
228 228
       if (!($this->event->getStartDate()->format('H:i') == '00:00')) {
229 229
         $start_period = new \DatePeriod($start_date, $interval, new \DateTime($start_date->format("Y-n-j 23:59:59")));
230 230
         $itemized_start = $this->createHourlyGranular($start_period, $start_date);
231
-        $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d' . $sd] = -1;
232
-        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd];
233
-        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd];
231
+        $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d'.$sd] = -1;
232
+        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d'.$sd] = $itemized_start[EventItemizer::BAT_HOUR][$sy][$sm]['d'.$sd];
233
+        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d'.$sd] = $itemized_start[EventItemizer::BAT_MINUTE][$sy][$sm]['d'.$sd];
234 234
       }
235 235
       else {
236 236
         // Just set an empty hour and minute
237
-        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = array();
238
-        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = array();
237
+        $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d'.$sd] = array();
238
+        $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d'.$sd] = array();
239 239
       }
240 240
 
241 241
       // Deal with the end date unless it ends just before midnight at which point we don't need to go further
242 242
       if ($this->event->getEndDate()->format('H:i') == '23:59') {
243
-        $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = array();
244
-        $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = array();
243
+        $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d'.$ed] = array();
244
+        $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d'.$ed] = array();
245 245
       }
246 246
       else {
247 247
         $end_period = new \DatePeriod(new \DateTime($end_date->format("Y-n-j 00:00:00")), $interval, $end_date->add(new \DateInterval('PT1M')));
248 248
         $itemized_end = $this->createHourlyGranular($end_period, new \DateTime($end_date->format("Y-n-j 00:00:00")));
249
-        $itemized[EventItemizer::BAT_DAY][$ey][$em]['d' . $ed] = -1;
250
-        $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = $itemized_end[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed];
251
-        $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = $itemized_end[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed];
249
+        $itemized[EventItemizer::BAT_DAY][$ey][$em]['d'.$ed] = -1;
250
+        $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d'.$ed] = $itemized_end[EventItemizer::BAT_HOUR][$ey][$em]['d'.$ed];
251
+        $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d'.$ed] = $itemized_end[EventItemizer::BAT_MINUTE][$ey][$em]['d'.$ed];
252 252
       }
253 253
     }
254 254
 
@@ -270,9 +270,9 @@  discard block
 block discarded – undo
270 270
     $start_minute = $counter;
271 271
     foreach ($period as $minute) {
272 272
       // Doing minutes so set the values in the minute array
273
-      $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();
273
+      $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();
274 274
       // Let the hours know that it cannot determine availability
275
-      $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = -1;
275
+      $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d'.$minute->format('j')]['h'.$minute->format('G')] = -1;
276 276
       $counter++;
277 277
 
278 278
       if ($counter == 60 && $start_minute !== 0) {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
       }
283 283
       elseif ($counter == 60 && $start_minute == 0) {
284 284
         // Did a real whole hour so initialize the hour
285
-        $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d' . $minute->format('j')]['h' . $minute->format('G')] = $this->event->getValue();
285
+        $itemized[EventItemizer::BAT_HOUR][$minute->format('Y')][$minute->format('n')]['d'.$minute->format('j')]['h'.$minute->format('G')] = $this->event->getValue();
286 286
 
287 287
         $counter = 0;
288 288
         $start_minute = 0;
@@ -301,9 +301,9 @@  discard block
 block discarded – undo
301 301
 
302 302
         $hour = $date->format('G');
303 303
         for ($i = 0; $i < 60; $i++) {
304
-          $minute = ($i < 10) ? '0' . $i : $i;
304
+          $minute = ($i < 10) ? '0'.$i : $i;
305 305
 
306
-          $itemized[EventItemizer::BAT_MINUTE][$date->format('Y')][$date->format('n')]['d' . $date->format('j')]['h' . $hour]['m' . $minute] = $this->event->getValue();
306
+          $itemized[EventItemizer::BAT_MINUTE][$date->format('Y')][$date->format('n')]['d'.$date->format('j')]['h'.$hour]['m'.$minute] = $this->event->getValue();
307 307
         }
308 308
       }
309 309
     }
Please login to merge, or discard this patch.