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 ( 5d93fe...e96ad3 )
by
unknown
08:21
created
src/Store/SqlLiteDBStore.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
    */
35 35
   public function getEventData(\DateTime $start_date, \DateTime $end_date, $unit_ids) {
36 36
 
37
-    $queries  = $this->buildQueries($start_date, $end_date, $unit_ids);
37
+    $queries = $this->buildQueries($start_date, $end_date, $unit_ids);
38 38
 
39 39
     $results = array();
40 40
     // Run each query and store results
@@ -49,26 +49,26 @@  discard block
 block discarded – undo
49 49
       // Figure out how many days the current month has
50 50
       $temp_date = new \DateTime($data['year'] . "-" . $data['month']);
51 51
       $days_in_month = (int)$temp_date->format('t');
52
-      for ($i = 1; $i<=$days_in_month; $i++) {
53
-        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d'.$i];
52
+      for ($i = 1; $i <= $days_in_month; $i++) {
53
+        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d' . $i];
54 54
       }
55 55
     }
56 56
 
57 57
     // With the day events taken care off let's cycle through hours
58 58
     foreach ($results[Event::BAT_HOUR]->fetchAll() as $data) {
59
-      for ($i = 0; $i<=23; $i++) {
60
-        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']][$data['day']]['h'. $i] = $data['h'.$i];
59
+      for ($i = 0; $i <= 23; $i++) {
60
+        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']][$data['day']]['h' . $i] = $data['h' . $i];
61 61
       }
62 62
     }
63 63
 
64 64
     // With the hour events taken care off let's cycle through minutes
65 65
     foreach ($results[Event::BAT_MINUTE]->fetchAll() as $data) {
66
-      for ($i = 0; $i<=59; $i++) {
66
+      for ($i = 0; $i <= 59; $i++) {
67 67
         if ($i <= 9) {
68
-          $index = 'm0'.$i;
68
+          $index = 'm0' . $i;
69 69
         }
70 70
         else {
71
-          $index = 'm'.$i;
71
+          $index = 'm' . $i;
72 72
         }
73 73
         $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']][$data['day']][$data['hour']][$index] = $data[$index];
74 74
       }
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
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
    */
27 27
   public function getEventData(\DateTime $start_date, \DateTime $end_date, $unit_ids) {
28 28
 
29
-    $queries  = $this->buildQueries($start_date, $end_date, $unit_ids);
29
+    $queries = $this->buildQueries($start_date, $end_date, $unit_ids);
30 30
 
31 31
     $results = array();
32 32
     // Run each query and store results
@@ -37,30 +37,30 @@  discard block
 block discarded – undo
37 37
     $db_events = array();
38 38
 
39 39
     // Cycle through day results and setup an event array
40
-    while( $data = $results[Event::BAT_DAY]->fetchAssoc()) {
40
+    while ($data = $results[Event::BAT_DAY]->fetchAssoc()) {
41 41
       // Figure out how many days the current month has
42 42
       $temp_date = new \DateTime($data['year'] . "-" . $data['month']);
43 43
       $days_in_month = (int)$temp_date->format('t');
44
-      for ($i = 1; $i<=$days_in_month; $i++) {
45
-        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d'.$i];
44
+      for ($i = 1; $i <= $days_in_month; $i++) {
45
+        $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d' . $i];
46 46
       }
47 47
     }
48 48
 
49 49
     // With the day events taken care off let's cycle through hours
50
-    while( $data = $results[Event::BAT_HOUR]->fetchAssoc()) {
51
-      for ($i = 0; $i<=23; $i++) {
52
-        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']][$data['day']]['h'. $i] = $data['h'.$i];
50
+    while ($data = $results[Event::BAT_HOUR]->fetchAssoc()) {
51
+      for ($i = 0; $i <= 23; $i++) {
52
+        $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']][$data['day']]['h' . $i] = $data['h' . $i];
53 53
       }
54 54
     }
55 55
 
56 56
     // With the hour events taken care off let's cycle through minutes
57
-    while( $data = $results[Event::BAT_MINUTE]->fetchAssoc()) {
58
-      for ($i = 0; $i<=59; $i++) {
57
+    while ($data = $results[Event::BAT_MINUTE]->fetchAssoc()) {
58
+      for ($i = 0; $i <= 59; $i++) {
59 59
         if ($i <= 9) {
60
-          $index = 'm0'.$i;
60
+          $index = 'm0' . $i;
61 61
         }
62 62
         else {
63
-          $index = 'm'.$i;
63
+          $index = 'm' . $i;
64 64
         }
65 65
         $db_events[$data['unit_id']][Event::BAT_MINUTE][$data['year']][$data['month']][$data['day']][$data['hour']][$index] = $data[$index];
66 66
       }
Please login to merge, or discard this patch.
src/Store/SqlDBStore.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,16 +100,16 @@
 block discarded – undo
100 100
 
101 101
     $query_parameters = '';
102 102
 
103
-    foreach($itemized[Event::BAT_DAY] as $year => $months) {
103
+    foreach ($itemized[Event::BAT_DAY] as $year => $months) {
104 104
       if ($year_count > 0) {
105 105
         // We are dealing with multiple years so add an OR
106 106
         $query_parameters .= ' OR ';
107 107
       }
108 108
       $query_parameters .= 'year IN (' . $year . ') ';
109
-      $query_parameters .= 'AND month IN (' . implode("," ,array_keys($months)) .') ';
109
+      $query_parameters .= 'AND month IN (' . implode(",", array_keys($months)) . ') ';
110 110
       if (count($unit_ids) > 0) {
111 111
         // Unit ids are defined so add this as a filter
112
-        $query_parameters .= 'AND unit_id in (' . implode("," , $unit_ids) .') ';
112
+        $query_parameters .= 'AND unit_id in (' . implode(",", $unit_ids) . ') ';
113 113
       }
114 114
       $year_count++;
115 115
     }
Please login to merge, or discard this patch.