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

src/Document.php 2 locations

@@ 570-581 (lines=12) @@
567
     * @param \MongoId|string $id id of document
568
     * @return Document
569
     */
570
    public function defineId($id)
571
    {
572
        if (!($id instanceof \MongoId)) {
573
            try {
574
                $id = new \MongoId($id);
575
            } catch (\MongoException $e) {}
576
        }
577
578
        $this->mergeUnmodified(array('_id' => $id));
579
580
        return $this;
581
    }
582
583
    /**
584
     * Used to define id of not stored document.
@@ 589-598 (lines=10) @@
586
     * @param \MongoId|string $id id of document
587
     * @return Document
588
     */
589
    public function setId($id)
590
    {
591
        if (!($id instanceof \MongoId)) {
592
            try {
593
                $id = new \MongoId($id);
594
            } catch (\MongoException $e) {}
595
        }
596
597
        return $this->set('_id', $id);
598
    }
599
600
    public function isStored()
601
    {