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 = 7-8 lines in 2 locations

applications/workspace/src/BitPrepared/Bundle/D1b0Workspace/Controller/V1/WorkspaceController.php 2 locations

@@ 114-121 (lines=8) @@
111
        $part_id = R::store($part);
112
113
        //add the badge to the project
114
        foreach ($data['badges'] as $badge_id) {
115
            //TODO insert those badge as first hidden post
116
            $pb = R::dispense("partbadge");
117
                $pb->badge = $badge_id;
118
                $pb->part = $part_id;
119
                $pb->inserttime = date('Y-m-d H:i:s');
120
            $tmp = R::store($pb);
121
        }
122
123
        //add the workspace created to the user as owner
124
        $usw = R::dispense("userworkspace");
@@ 308-314 (lines=7) @@
305
            $resource_id = R::store($resource);
306
        }
307
308
        foreach($data['badges'] as $badge_id){ //TODO va fixato nelle api
309
            $pb = R::dispense("partbadge");
310
                $pb->badge = $badge_id;
311
                $pb->part = $part_id;
312
                $pb->inserttime = date('Y-m-d H:i:s');
313
            $tmp = R::store($pb);
314
        }
315
316
        $res = ["id"=>$part_id];
317
        $headers = [];