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

src/Framework/Base/Repositories/Eloquent/Repository.php 2 locations

@@ 277-298 (lines=22) @@
274
     *
275
     * @return mixed
276
     */
277
    public function restore($id)
278
    {
279
        $this->applyScope();
280
281
        $temporarySkipPresenter = $this->skipPresenter;
282
        $this->skipPresenter(true);
283
284
        $model = $this->withTrashed()->find($id);
285
286
        $this->skipPresenter($temporarySkipPresenter);
287
        $this->resetModel();
288
289
        $restored = $model->restore();
290
291
        event(new RepositoryEntityUpdated($this, $model));
292
293
        if ($restored) {
294
            $restored = $model;
295
        }
296
297
        return $this->parserResult($restored);
298
    }
299
300
    /**
301
     * restore multiple entities by given criteria.
@@ 337-355 (lines=19) @@
334
     *
335
     * @return int
336
     */
337
    public function ForceDelete($id)
338
    {
339
        $this->applyScope();
340
341
        $temporarySkipPresenter = $this->skipPresenter;
342
        $this->skipPresenter(true);
343
344
        $model = $this->find($id);
345
        $originalModel = clone $model;
346
347
        $this->skipPresenter($temporarySkipPresenter);
348
        $this->resetModel();
349
350
        $deleted = $model->ForceDelete();
351
352
        event(new RepositoryEntityDeleted($this, $originalModel));
353
354
        return $deleted;
355
    }
356
357
    /**
358
     * ForceDelete multiple entities by given criteria.