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-14 lines in 2 locations

src/Cursor.php 2 locations

@@ 672-681 (lines=10) @@
669
        return $this->collection->hydrate($mongoDocument, $this->isDocumentPoolUsed());
670
    }
671
672
    public function map($handler)
673
    {
674
        $result = array();
675
676
        foreach($this as $id => $document) {
677
            $result[$id] = $handler($document);
678
        }
679
680
        return $result;
681
    }
682
683
    public function filter($handler)
684
    {
@@ 683-696 (lines=14) @@
680
        return $result;
681
    }
682
683
    public function filter($handler)
684
    {
685
        $result = array();
686
687
        foreach($this as $id => $document) {
688
            if(!$handler($document)) {
689
                continue;
690
            }
691
692
            $result[$id] = $document;
693
        }
694
695
        return $result;
696
    }
697
698
    /**
699
     * Get result set of documents.