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 ( 729ed9...157ece )
by Toby
05:11
created
src/AirTable.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
     
215 215
     public function getIdsFromTable(): array
216 216
     {
217
-         $ids = [];
217
+            $ids = [];
218 218
         foreach($this->retrieveRecords() as $record) {
219 219
             $ids[] = $record['id'];
220 220
         }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $options = [
103 103
             'headers' => [
104
-                'Authorization' => 'Bearer ' . $this->apiKey
104
+                'Authorization' => 'Bearer '.$this->apiKey
105 105
             ]
106 106
         ];
107
-        if($data !== null) {
108
-            if($method === 'get' || $method === 'delete') {
107
+        if ($data !== null) {
108
+            if ($method === 'get' || $method === 'delete') {
109 109
                 $options['query'] = $data;
110 110
             } else {
111 111
                 $options['json'] = $data;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         try {
123 123
             return $execution->call($this, $dataChunk);
124 124
         } catch (\GuzzleHttp\Exception\ClientException $exception) {
125
-            if($exception->getCode() === 429) {
125
+            if ($exception->getCode() === 429) {
126 126
                 sleep(static::$rateLimitCooldown);
127 127
                 return $this->execute($dataChunk, $execution);
128 128
             } else {
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
     protected function chunkAndThrottle(array $data, \Closure $execution, int $delay = 1, int $chunkSize = 10)
135 135
     {
136 136
         $chunkedData = array_chunk($data, $chunkSize, false);
137
-        foreach($chunkedData as $key => $dataChunk) {
137
+        foreach ($chunkedData as $key => $dataChunk) {
138 138
             $this->execute($dataChunk, $execution);
139
-            if($key !== array_key_last($chunkedData)) {
139
+            if ($key !== array_key_last($chunkedData)) {
140 140
                 sleep($delay);
141 141
             }
142 142
         }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public function createRows(array $rows, bool $typecast = true)
158 158
     {
159 159
         $data = [];
160
-        foreach($rows as $row) {
160
+        foreach ($rows as $row) {
161 161
             $data[] = ['fields' => $row];
162 162
         }
163 163
         
@@ -203,19 +203,19 @@  discard block
 block discarded – undo
203 203
             }
204 204
             
205 205
             $records = array_merge($records, $newRecords);
206
-            if(array_key_exists('offset', $responseData)) {
206
+            if (array_key_exists('offset', $responseData)) {
207 207
                 $offset = $responseData['offset'];
208 208
             } else {
209 209
                 $offset = null;
210 210
             }
211
-        } while($offset !== null);
211
+        } while ($offset !== null);
212 212
         return $records;
213 213
     }
214 214
     
215 215
     public function getIdsFromTable(): array
216 216
     {
217 217
          $ids = [];
218
-        foreach($this->retrieveRecords() as $record) {
218
+        foreach ($this->retrieveRecords() as $record) {
219 219
             $ids[] = $record['id'];
220 220
         }
221 221
         return $ids;
Please login to merge, or discard this patch.
src/AirTableServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
     {
17 17
         ProgressExport::extend('airtable', function($container, $config) {
18 18
             $missingKey = null;
19
-            if(!array_key_exists('apiKey', $config)) {
19
+            if (!array_key_exists('apiKey', $config)) {
20 20
                 $missingKey = 'apiKey';
21 21
             }
22
-            if(!array_key_exists('tableName', $config)) {
22
+            if (!array_key_exists('tableName', $config)) {
23 23
                 $missingKey = 'tableName';
24 24
             }
25
-            if(!array_key_exists('baseId', $config)) {
25
+            if (!array_key_exists('baseId', $config)) {
26 26
                 $missingKey = 'baseId';
27 27
             }
28
-            if($missingKey !== null) {
28
+            if ($missingKey !== null) {
29 29
                 throw new \Exception(sprintf('The [%s] field must be given', $missingKey));
30 30
             }
31 31
 
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
 
39 39
         Exporter::extend('airtable', function($container, $config) {
40 40
             $missingKey = null;
41
-            if(!array_key_exists('apiKey', $config)) {
41
+            if (!array_key_exists('apiKey', $config)) {
42 42
                 $missingKey = 'apiKey';
43 43
             }
44
-            if(!array_key_exists('tableName', $config)) {
44
+            if (!array_key_exists('tableName', $config)) {
45 45
                 $missingKey = 'tableName';
46 46
             }
47
-            if(!array_key_exists('baseId', $config)) {
47
+            if (!array_key_exists('baseId', $config)) {
48 48
                 $missingKey = 'baseId';
49 49
             }
50
-            if($missingKey !== null) {
50
+            if ($missingKey !== null) {
51 51
                 throw new \Exception(sprintf('The [%s] field must be given', $missingKey));
52 52
             }
53 53
 
Please login to merge, or discard this patch.
src/Jobs/CreateRecords.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
 
63 63
     private function log(string $string)
64 64
     {
65
-        if($this->debug) {
65
+        if ($this->debug) {
66 66
             Log::debug($string);
67 67
         }
68 68
     }
Please login to merge, or discard this patch.
src/Jobs/DeleteRows.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
     private function log(string $string)
67 67
     {
68
-        if($this->debug) {
68
+        if ($this->debug) {
69 69
             Log::debug($string);
70 70
         }
71 71
     }
Please login to merge, or discard this patch.
src/Jobs/FlushRows.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $ids = $airTable->getIdsFromTable();
37 37
         $this->log('Retrieved IDs');
38 38
         $this->log('Deleting Rows');
39
-        foreach(array_chunk($ids, 50) as $idsToDelete) {
39
+        foreach (array_chunk($ids, 50) as $idsToDelete) {
40 40
             dispatch((new DeleteRows(
41 41
                 $idsToDelete,
42 42
                 $this->apiKey,
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     private function log(string $string)
56 56
     {
57
-        if($this->debug) {
57
+        if ($this->debug) {
58 58
             Log::debug($string);
59 59
         }
60 60
     }
Please login to merge, or discard this patch.
src/Progress/AirtableHandler.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     protected function filterModules(\Closure $filter, Progress $progress, $moduleInstances)
34 34
     {
35 35
         return collect($progress->getModules())
36
-            ->filter($filter)->map(function (ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) {
36
+            ->filter($filter)->map(function(ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) {
37 37
                 return $moduleInstances[$moduleInstanceProgress->getModuleInstanceId()];
38 38
             })->values()->toArray();
39 39
     }
@@ -44,35 +44,35 @@  discard block
 block discarded – undo
44 44
             ->getById($progress->getActivityInstanceId());
45 45
         $moduleInstances = app(ModuleInstanceRepository::class)
46 46
             ->allThroughActivity($activityInstance->activity)
47
-            ->reduce(function ($carry, ModuleInstance $moduleInstance) {
47
+            ->reduce(function($carry, ModuleInstance $moduleInstance) {
48 48
                 $carry[$moduleInstance->id()] = $moduleInstance->name;
49 49
                 return $carry;
50 50
             });
51 51
 
52 52
         return [
53 53
             'Participant Name' => $activityInstance->participantName(),
54
-            'Mandatory Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
54
+            'Mandatory Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
55 55
                 return $moduleInstanceProgress->isMandatory();
56 56
             }, $progress, $moduleInstances),
57
-            'Optional Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
57
+            'Optional Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
58 58
                 return !$moduleInstanceProgress->isMandatory();
59 59
             }, $progress, $moduleInstances),
60
-            'Complete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
60
+            'Complete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
61 61
                 return $moduleInstanceProgress->isComplete();
62 62
             }, $progress, $moduleInstances),
63
-            'Incomplete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
63
+            'Incomplete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
64 64
                 return !$moduleInstanceProgress->isComplete();
65 65
             }, $progress, $moduleInstances),
66
-            'Active Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
66
+            'Active Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
67 67
                 return $moduleInstanceProgress->isActive();
68 68
             }, $progress, $moduleInstances),
69
-            'Inactive Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
69
+            'Inactive Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
70 70
                 return !$moduleInstanceProgress->isActive();
71 71
             }, $progress, $moduleInstances),
72
-            'Hidden Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
72
+            'Hidden Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
73 73
                 return !$moduleInstanceProgress->isVisible();
74 74
             }, $progress, $moduleInstances),
75
-            'Visible Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) {
75
+            'Visible Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) {
76 76
                 return $moduleInstanceProgress->isVisible();
77 77
             }, $progress, $moduleInstances),
78 78
             '% Complete' => $progress->getPercentage(),
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         
113 113
         $this->log('Flushed rows');
114 114
         
115
-        foreach(array_chunk($data, 10) as $rows) {
115
+        foreach (array_chunk($data, 10) as $rows) {
116 116
             dispatch((new CreateRecords(
117 117
                 $rows,
118 118
                 $this->apiKey,
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     private function log(string $string)
128 128
     {
129
-        if($this->debug) {
129
+        if ($this->debug) {
130 130
             Log::debug($string);
131 131
         }
132 132
     }
Please login to merge, or discard this patch.
src/Control/AirtableHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $creating = [];
25 25
         
26
-        foreach($items as $item) {
26
+        foreach ($items as $item) {
27 27
             $creating[] = $item->toArray();
28 28
         }
29 29
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $this->log('Flushed rows. Creating records');
41 41
 
42 42
 
43
-        foreach(array_chunk($creating, 10) as $data) {
43
+        foreach (array_chunk($creating, 10) as $data) {
44 44
             dispatch((new CreateRecords(
45 45
                 $data,
46 46
                 $this->config('apiKey'),
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     private function log(string $string)
57 57
     {
58
-        if($this->config('debug', false)) {
58
+        if ($this->config('debug', false)) {
59 59
             Log::debug($string);
60 60
         }
61 61
     }
Please login to merge, or discard this patch.