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
Push — master ( 869ff2...919b18 )
by Adrian
11s
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/Constraint/ConstraintManager.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
   protected function normalizeMinMaxDaysConstraints() {
97 97
     $new_constraints = array();
98 98
 
99
-    $constraints = array_map(function ($object) { return clone $object; }, $this->constraints['Roomify\Bat\Constraint\MinMaxDaysConstraint']);
99
+    $constraints = array_map(function($object) { return clone $object; }, $this->constraints['Roomify\Bat\Constraint\MinMaxDaysConstraint']);
100 100
 
101 101
     foreach (array_reverse($constraints) as $constraint) {
102 102
       $start_date = $constraint->getStartDate();
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
   protected function normalizeCheckInDayConstraints() {
173 173
     $new_constraints = array();
174 174
 
175
-    $constraints = array_map(function ($object) { return clone $object; }, $this->constraints['Roomify\Bat\Constraint\CheckInDayConstraint']);
175
+    $constraints = array_map(function($object) { return clone $object; }, $this->constraints['Roomify\Bat\Constraint\CheckInDayConstraint']);
176 176
 
177 177
     foreach (array_reverse($constraints) as $constraint) {
178 178
       $start_date = $constraint->getStartDate();
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,12 +115,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.