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 ( de2a9f...1034b2 )
by
unknown
02:02 queued 43s
created
src/Store/SqlLiteDBStore.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
     // Cycle through day results and setup an event array
50 50
     foreach ($results[Event::BAT_DAY]->fetchAll() as $data) {
51 51
       // Figure out how many days the current month has
52
-      $temp_date = new \DateTime($data['year'] . "-" . $data['month']);
52
+      $temp_date = new \DateTime($data['year']."-".$data['month']);
53 53
       $days_in_month = (int)$temp_date->format('t');
54 54
       for ($i = 1; $i <= $days_in_month; $i++) {
55
-        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d' . $i];
55
+        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d'.$i] = $data['d'.$i];
56 56
       }
57 57
     }
58 58
 
59 59
     // With the day events taken care off let's cycle through hours
60 60
     foreach ($results[Event::BAT_HOUR]->fetchAll() as $data) {
61 61
       for ($i = 0; $i <= 23; $i++) {
62
-        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d' . $data['day']]['h' . $i] = $data['h' . $i];
62
+        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d'.$data['day']]['h'.$i] = $data['h'.$i];
63 63
       }
64 64
     }
65 65
 
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
     foreach ($results[Event::BAT_MINUTE]->fetchAll() as $data) {
68 68
       for ($i = 0; $i <= 59; $i++) {
69 69
         if ($i <= 9) {
70
-          $index = 'm0' . $i;
70
+          $index = 'm0'.$i;
71 71
         } else {
72
-          $index = 'm' . $i;
72
+          $index = 'm'.$i;
73 73
         }
74
-        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d' . $data['day']]['h' . $data['hour']][$index] = $data[$index];
74
+        $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']]['d'.$data['day']]['h'.$data['hour']][$index] = $data[$index];
75 75
       }
76 76
     }
77 77
 
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
               $command .= "$day = $value,";
111 111
             }
112 112
             $command = rtrim($command, ',');
113
-            $command .= " WHERE unit_id = " . $unit_id . " AND year = $year AND month = $month";
113
+            $command .= " WHERE unit_id = ".$unit_id." AND year = $year AND month = $month";
114 114
             $this->pdo->exec($command);
115 115
           }
116 116
           else {
117
-            $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, " . implode(', ', $keys) . ") VALUES (" . $unit_id . ", $year, $month, " . implode(', ', $values) . ")");
117
+            $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, ".implode(', ', $keys).") VALUES (".$unit_id.", $year, $month, ".implode(', ', $values).")");
118 118
           }
119 119
         }
120 120
       }
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
                 $keys = array_keys($hours);
131 131
                 if (isset($existing_events[$unit_id][EVENT::BAT_HOUR][$year][$month][$day])) {
132 132
                   $command = "UPDATE $this->hour_table SET ";
133
-                  foreach ($hours as $hour => $value){
133
+                  foreach ($hours as $hour => $value) {
134 134
                     $this->itemizeSplitHour($existing_events, $itemized, $value, $unit_id, $year, $month, $day, $hour);
135 135
                     $command .= "$hour = $value,";
136 136
                   }
137 137
                   $command = rtrim($command, ',');
138
-                  $command .= " WHERE unit_id = " . $unit_id . " AND year = $year AND month = $month AND day = " . substr($day,1);
138
+                  $command .= " WHERE unit_id = ".$unit_id." AND year = $year AND month = $month AND day = ".substr($day, 1);
139 139
                   $this->pdo->exec($command);
140 140
                 } else {
141 141
                   if (isset($existing_events[$unit_id][EVENT::BAT_DAY][$year][$month][$day])) {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                       $this->itemizeSplitHour($existing_events, $itemized, $value, $unit_id, $year, $month, $day, $hour);
144 144
                     }
145 145
                   }
146
-                  $this->pdo->exec("INSERT INTO $this->hour_table (unit_id, year, month, day, " . implode(', ', $keys) . ") VALUES (" . $unit_id . ", $year, $month, " . substr($day, 1) . ", " . implode(', ', $values) . ")");
146
+                  $this->pdo->exec("INSERT INTO $this->hour_table (unit_id, year, month, day, ".implode(', ', $keys).") VALUES (".$unit_id.", $year, $month, ".substr($day, 1).", ".implode(', ', $values).")");
147 147
                 }
148 148
               }
149 149
             }
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
                 $keys = array_keys($minutes);
160 160
                 if (isset($existing_events[$unit_id][EVENT::BAT_MINUTE][$year][$month][$day][$hour])) {
161 161
                   $command = "UPDATE $this->minute_table SET ";
162
-                  foreach ($minutes as $minute => $value){
162
+                  foreach ($minutes as $minute => $value) {
163 163
                     $command .= "$minute = $value,";
164 164
                   }
165 165
                   $command = rtrim($command, ',');
166
-                  $command .= " WHERE unit_id = " . $unit_id . " AND year = $year AND month = $month AND day = " . substr($day,1) . " AND hour = " . substr($hour,1);
166
+                  $command .= " WHERE unit_id = ".$unit_id." AND year = $year AND month = $month AND day = ".substr($day, 1)." AND hour = ".substr($hour, 1);
167 167
                   $this->pdo->exec($command);
168 168
                 } else {
169
-                  $this->pdo->exec("INSERT INTO $this->minute_table (unit_id, year, month, day, hour, " . implode(', ', $keys) . ") VALUES (" . $unit_id . ", $year, $month, " . substr($day, 1) . ", " . substr($hour, 1) . ", " . implode(', ', $values) . ")");
169
+                  $this->pdo->exec("INSERT INTO $this->minute_table (unit_id, year, month, day, hour, ".implode(', ', $keys).") VALUES (".$unit_id.", $year, $month, ".substr($day, 1).", ".substr($hour, 1).", ".implode(', ', $values).")");
170 170
                 }
171 171
               }
172 172
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,8 +112,7 @@
 block discarded – undo
112 112
             $command = rtrim($command, ',');
113 113
             $command .= " WHERE unit_id = " . $unit_id . " AND year = $year AND month = $month";
114 114
             $this->pdo->exec($command);
115
-          }
116
-          else {
115
+          } else {
117 116
             $this->pdo->exec("INSERT INTO $this->day_table (unit_id, year, month, " . implode(', ', $keys) . ") VALUES (" . $unit_id . ", $year, $month, " . implode(', ', $values) . ")");
118 117
           }
119 118
         }
Please login to merge, or discard this patch.