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 — develop ( 8960eb...4cfcae )
by Toby
12:56
created
src/Export/FormattedItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     
56 56
     public function getItem($column, $default = null)
57 57
     {
58
-        if(array_key_exists($column, $this->prepared) && $this->prepared[$column] !== null) {
58
+        if (array_key_exists($column, $this->prepared) && $this->prepared[$column] !== null) {
59 59
             return $this->prepared[$column];
60 60
         }
61 61
         return $default;
Please login to merge, or discard this patch.
src/Export/Handler/UsesCsv.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
     public function getHeaders($items)
16 16
     {
17 17
         $headers = [];
18
-        foreach($items as $item) {
19
-            foreach($item->getColumnNames() as $column) {
20
-                if(!in_array($column, $headers)) {
18
+        foreach ($items as $item) {
19
+            foreach ($item->getColumnNames() as $column) {
20
+                if (!in_array($column, $headers)) {
21 21
                     $headers[] = $column;
22 22
                 }
23 23
             }
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
         $headers = $headers ?? $this->getHeaders($items);
37 37
         
38 38
         $rows = [];
39
-        foreach($items as $item) {
39
+        foreach ($items as $item) {
40 40
             $row = [];
41
-            foreach($headers as $header) {
41
+            foreach ($headers as $header) {
42 42
                 $row[] = $item->getItem($header, $defaultIfNull);
43 43
             }
44 44
             $rows[] = $row;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         
56 56
         fputcsv($csv, $this->getHeaders($items));
57 57
 
58
-        foreach($this->getRows($items, $headers, $defaultIfNull) as $row) {
58
+        foreach ($this->getRows($items, $headers, $defaultIfNull) as $row) {
59 59
             fputcsv($csv, $row);
60 60
         }
61 61
         
Please login to merge, or discard this patch.
src/Export/ExportManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,13 +99,13 @@
 block discarded – undo
99 99
     protected function configurationFor($name)
100 100
     {
101 101
         $config = $this->container['config']["control.export.{$name}"];
102
-        if(is_null($config)) {
102
+        if (is_null($config)) {
103 103
             return null;
104 104
         }
105
-        if(!isset($config['formatters'])) {
105
+        if (!isset($config['formatters'])) {
106 106
             $config['formatters'] = [];
107 107
         }
108
-        foreach($this->formatters() as $formatter => $formatterConfig) {
108
+        foreach ($this->formatters() as $formatter => $formatterConfig) {
109 109
             $config['formatters'][$formatter] = $formatterConfig;
110 110
         }
111 111
         
Please login to merge, or discard this patch.
src/Export/Formatter/Shared/SortByColumn.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@
 block discarded – undo
15 15
         usort($items, function($a, $b) use ($column) {
16 16
             $aVal = $a->getItem($column);
17 17
             $bVal = $b->getItem($column);
18
-            if(is_null($aVal) && is_null($bVal)) {
18
+            if (is_null($aVal) && is_null($bVal)) {
19 19
                 return 0;
20 20
             }
21
-            if(is_null($aVal) && !is_null($bVal)) {
21
+            if (is_null($aVal) && !is_null($bVal)) {
22 22
                 return 1;
23 23
             }
24
-            if(!is_null($aVal) && is_null($bVal)) {
24
+            if (!is_null($aVal) && is_null($bVal)) {
25 25
                 return -1;
26 26
             }
27
-            if(is_string($aVal) || is_string($bVal)) {
27
+            if (is_string($aVal) || is_string($bVal)) {
28 28
                 return $this->compareStrings($aVal, $bVal);
29 29
             }
30
-            if(is_int($aVal) || is_int($bVal)) {
30
+            if (is_int($aVal) || is_int($bVal)) {
31 31
                 return $this->compareInts($aVal, $bVal);
32 32
             }
33 33
             return 0;
Please login to merge, or discard this patch.
src/Export/Formatter/Role/AddRoleHoldersAsNewItems.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
     public function format($items)
12 12
     {
13 13
         $newItems = [];
14
-        foreach($items as $item) {
15
-            foreach($item->original()->users() as $user) {
14
+        foreach ($items as $item) {
15
+            foreach ($item->original()->users() as $user) {
16 16
                 $newItem = clone $item;
17 17
                 $dataUser = $user->data();
18 18
                 $newItem->addRow('User ID', $user->id());
Please login to merge, or discard this patch.
src/Export/Formatter/Formatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function config(string $key, $default = null)
64 64
     {
65
-        if(array_key_exists($key, $this->config)) {
65
+        if (array_key_exists($key, $this->config)) {
66 66
             return $this->config[$key];
67 67
         }
68 68
         return $default;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     
86 86
     protected function canHandle(FormattedItem $item): bool
87 87
     {
88
-        if($this->handles() === self::ALL) {
88
+        if ($this->handles() === self::ALL) {
89 89
             return true;
90 90
         }
91 91
         return $item->isType($this->handles());
Please login to merge, or discard this patch.
src/Export/Handler/Handler.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     protected function prepareItems($items)
29 29
     {
30 30
         $formattedItems = [];
31
-        foreach($items as $item) {
31
+        foreach ($items as $item) {
32 32
             $formattedItems[] = FormattedItem::create($item);
33 33
         }
34 34
         return $formattedItems;
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
     
37 37
     public function export($items = [])
38 38
     {
39
-        if($items instanceof Collection) {
39
+        if ($items instanceof Collection) {
40 40
             $items = $items->all();
41 41
         }
42 42
         $formattedItems = $this->prepareItems($items);
43
-        foreach($this->getFormatters() as $formatter) {
44
-            $time=-hrtime(true);
43
+        foreach ($this->getFormatters() as $formatter) {
44
+            $time = -hrtime(true);
45 45
             $formattedItems = $formatter->format($formattedItems);
46
-            $time+=hrtime(true);
46
+            $time += hrtime(true);
47 47
             $this->logTime(class_basename($formatter), $time / 1e+9);
48 48
         }
49 49
         $this->save($formattedItems);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     protected function getFormatters()
56 56
     {
57 57
         return array_map(function($className) {
58
-            if(class_exists($className)) {
58
+            if (class_exists($className)) {
59 59
                 return new $className($this->config('formatters')[$className]);
60 60
             }
61 61
             throw new \Exception(sprintf('Formatter %s does not exist', $className));
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     protected function config(string $key, $default = null)
78 78
     {
79
-        if(array_key_exists($key, $this->config)) {
79
+        if (array_key_exists($key, $this->config)) {
80 80
             return $this->config[$key];
81 81
         }
82 82
         return $default;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     private function logTime(string $formatter, float $time)
86 86
     {
87
-        if(config('control.log-formatters')) {
87
+        if (config('control.log-formatters')) {
88 88
             Log::info(sprintf('Formatter [%s] took %.2f s to run', $formatter, $time));
89 89
         }
90 90
     }
Please login to merge, or discard this patch.
src/Repositories/DataUser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
             }
75 75
         }
76 76
         return \BristolSU\ControlDB\Models\DataUser::where(function($query) use ($baseAttributes) {
77
-            foreach($baseAttributes as $key => $value) {
78
-                $query = $query->orWhere($key, 'LIKE', '%' . $value . '%');
77
+            foreach ($baseAttributes as $key => $value) {
78
+                $query = $query->orWhere($key, 'LIKE', '%'.$value.'%');
79 79
             }
80 80
             return $query;
81
-        })->get()->filter(function (\BristolSU\ControlDB\Models\DataUser $dataUser) use ($additionalAttributes) {
81
+        })->get()->filter(function(\BristolSU\ControlDB\Models\DataUser $dataUser) use ($additionalAttributes) {
82 82
             foreach ($additionalAttributes as $additionalAttribute => $value) {
83 83
                 if ($dataUser->getAdditionalAttribute($additionalAttribute) !== $value) {
84 84
                     return false;
Please login to merge, or discard this patch.
src/Repositories/DataRole.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $roles = $this->getAllWhere($attributes);
33 33
 
34
-        if($roles->count() > 0) {
34
+        if ($roles->count() > 0) {
35 35
             return $roles->first();
36 36
         }
37 37
         throw (new ModelNotFoundException())->setModel(DataRole::class);
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
             }
70 70
         }
71 71
         return \BristolSU\ControlDB\Models\DataRole::where(function($query) use ($baseAttributes) {
72
-            foreach($baseAttributes as $key => $value) {
73
-                $query = $query->orWhere($key, 'LIKE', '%' . $value . '%');
72
+            foreach ($baseAttributes as $key => $value) {
73
+                $query = $query->orWhere($key, 'LIKE', '%'.$value.'%');
74 74
             }
75 75
             return $query;
76
-        })->get()->filter(function (\BristolSU\ControlDB\Models\DataRole $dataRole) use ($additionalAttributes) {
76
+        })->get()->filter(function(\BristolSU\ControlDB\Models\DataRole $dataRole) use ($additionalAttributes) {
77 77
             foreach ($additionalAttributes as $additionalAttribute => $value) {
78 78
                 if ($dataRole->getAdditionalAttribute($additionalAttribute) !== $value) {
79 79
                     return false;
Please login to merge, or discard this patch.