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

@@ 604-615 (lines=12) @@
601
     * @param \MongoId|string $id id of document
602
     * @return Document
603
     */
604
    public function defineId($id)
605
    {
606
        if (!($id instanceof \MongoId)) {
607
            try {
608
                $id = new \MongoId($id);
609
            } catch (\MongoException $e) {}
610
        }
611
612
        $this->mergeUnmodified(array('_id' => $id));
613
614
        return $this;
615
    }
616
617
    /**
618
     * Used to define id of not stored document.
@@ 623-632 (lines=10) @@
620
     * @param \MongoId|string $id id of document
621
     * @return Document
622
     */
623
    public function setId($id)
624
    {
625
        if (!($id instanceof \MongoId)) {
626
            try {
627
                $id = new \MongoId($id);
628
            } catch (\MongoException $e) {}
629
        }
630
631
        return $this->set('_id', $id);
632
    }
633
634
    public function isStored()
635
    {