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

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