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.

Code Duplication    Length = 12-13 lines in 2 locations

app/Repositories/SubuserRepository.php 2 locations

@@ 109-121 (lines=13) @@
106
            $perms = Permission::listPermissions(true);
107
            $daemonPermissions = $this->coreDaemonPermissions;
108
109
            foreach ($data['permissions'] as $permission) {
110
                if (array_key_exists($permission, $perms)) {
111
                    // Build the daemon permissions array for sending.
112
                    if (! is_null($perms[$permission])) {
113
                        array_push($daemonPermissions, $perms[$permission]);
114
                    }
115
116
                    Permission::create([
117
                        'subuser_id' => $subuser->id,
118
                        'permission' => $permission,
119
                    ]);
120
                }
121
            }
122
123
            // Contact Daemon
124
            // We contact even if they don't have any daemon permissions to overwrite
@@ 228-239 (lines=12) @@
225
            $perms = Permission::listPermissions(true);
226
            $daemonPermissions = $this->coreDaemonPermissions;
227
228
            foreach ($data['permissions'] as $permission) {
229
                if (array_key_exists($permission, $perms)) {
230
                    // Build the daemon permissions array for sending.
231
                    if (! is_null($perms[$permission])) {
232
                        array_push($daemonPermissions, $perms[$permission]);
233
                    }
234
                    Permission::create([
235
                        'subuser_id' => $subuser->id,
236
                        'permission' => $permission,
237
                    ]);
238
                }
239
            }
240
241
            // Contact Daemon
242
            // We contact even if they don't have any daemon permissions to overwrite