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

@@ 112-119 (lines=8) @@
109
        $part_id = R::store($part);
110
111
        //add the badge to the project
112
        foreach ($data['badges'] as $badge_id) {
113
            //TODO insert those badge as first hidden post
114
            $pb = R::dispense("partbadge");
115
                $pb->badge = $badge_id;
116
                $pb->part = $part_id;
117
                $pb->inserttime = date('Y-m-d H:i:s');
118
            $tmp = R::store($pb);
119
        }
120
121
        //add the workspace created to the user as owner
122
        $usw = R::dispense("userworkspace");
@@ 253-259 (lines=7) @@
250
            $resource_id = R::store($resource);
251
        }
252
253
        foreach($data['badges'] as $badge_id){ //TODO va fixato nelle api
254
            $pb = R::dispense("partbadge");
255
                $pb->badge = $badge_id;
256
                $pb->part = $part_id;
257
                $pb->inserttime = date('Y-m-d H:i:s');
258
            $tmp = R::store($pb);
259
        }
260
261
        $res = ["id"=>$part_id];
262
        $headers = [];