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.
Passed
Push — master ( 22dcbd...823690 )
by
unknown
04:39
created
src/DataFetcher/TimePeriodDataFetcher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $data = new Data();
35 35
 
36 36
         /** @var \DateTime $endDate */
37
-        $endDate = $configuration['timePeriod']['end']?:null;
37
+        $endDate = $configuration['timePeriod']['end'] ?: null;
38 38
 
39 39
         //There is added 23 hours 59 minutes 59 seconds to the end date to provide records for whole end date
40 40
         $configuration['timePeriod']['end'] = $endDate !== null ? $endDate->add(new \DateInterval('PT23H59M59S')) : null;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $labels = [];
92 92
         foreach ($labelsAux as $label) {
93 93
             if (!in_array($label, ['MonthDate', 'YearDate', 'DateDate'])) {
94
-                $labels[] = preg_replace('/(?!^)[A-Z]{2,}(?=[A-Z][a-z])|[A-Z][a-z]/', ' $0', (string)$label);
94
+                $labels[] = preg_replace('/(?!^)[A-Z]{2,}(?=[A-Z][a-z])|[A-Z][a-z]/', ' $0', (string) $label);
95 95
             }
96 96
         }
97 97
         $data->setLabels($labels);
@@ -165,16 +165,16 @@  discard block
 block discarded – undo
165 165
         foreach ($datas as $data) {
166 166
             $date = new \DateTime($data[$labels[0]]);
167 167
             $dateFormated = $date->format($configuration['timePeriod']['presentationFormat']);
168
-            $currentDateMedia = isset($datesMedia[$dateFormated])?$datesMedia[$dateFormated]:array('quantity' => 0, 'media' => 0);
169
-            $currentDateMedia['quantity'] = $currentDateMedia['quantity']+1;
170
-            $currentDateMedia['media'] = $currentDateMedia['media']+$data[$labels[1]];
168
+            $currentDateMedia = isset($datesMedia[$dateFormated]) ? $datesMedia[$dateFormated] : array('quantity' => 0, 'media' => 0);
169
+            $currentDateMedia['quantity'] = $currentDateMedia['quantity'] + 1;
170
+            $currentDateMedia['media'] = $currentDateMedia['media'] + $data[$labels[1]];
171 171
             $datesMedia[$dateFormated] = $currentDateMedia;
172 172
         }
173 173
         $fetched = [];
174 174
         foreach ($datesMedia as $date => $dateMedia) {
175 175
             $fetched[] = [
176 176
                 $labels[0] => $date,
177
-                $labels[1] => round($dateMedia['media']/$dateMedia['quantity'], 1)
177
+                $labels[1] => round($dateMedia['media'] / $dateMedia['quantity'], 1)
178 178
             ];
179 179
         }
180 180
         return $fetched;
Please login to merge, or discard this patch.