Code Duplication    Length = 7-7 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Aggregation/Builder.php 2 locations

@@ 419-425 (lines=7) @@
416
     * @param string|array|null $expression Optional. A replacement expression that
417
     * resolves to a document.
418
     */
419
    public function replaceRoot($expression = null) : Stage\ReplaceRoot
420
    {
421
        $stage = new Stage\ReplaceRoot($this, $this->dm, $this->class, $expression);
422
        $this->addStage($stage);
423
424
        return $stage;
425
    }
426
427
    /**
428
     * Randomly selects the specified number of documents from its input.
@@ 482-488 (lines=7) @@
479
     *
480
     * @see http://docs.mongodb.org/manual/reference/operator/aggregation/sortByCount/
481
     */
482
    public function sortByCount(string $expression) : Stage\SortByCount
483
    {
484
        $stage = new Stage\SortByCount($this, $expression, $this->dm, $this->class);
485
        $this->addStage($stage);
486
487
        return $stage;
488
    }
489
490
    /**
491
     * Deconstructs an array field from the input documents to output a document