Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 94-103 (lines=10) @@
91
     * @param array|self ...$expressions
92
     * @return $this
93
     */
94
    public function addAnd($expression, ...$expressions)
95
    {
96
        if (! isset($this->expr['$and'])) {
97
            $this->expr['$and'] = [];
98
        }
99
100
        $this->expr['$and'] = array_merge($this->expr['$and'], array_map([$this, 'ensureArray'], func_get_args()));
101
102
        return $this;
103
    }
104
105
    /**
106
     * Adds one or more $or clause to the current expression.
@@ 113-122 (lines=10) @@
110
     * @param array|self ...$expressions
111
     * @return $this
112
     */
113
    public function addOr($expression, ...$expressions)
114
    {
115
        if (! isset($this->expr['$or'])) {
116
            $this->expr['$or'] = [];
117
        }
118
119
        $this->expr['$or'] = array_merge($this->expr['$or'], array_map([$this, 'ensureArray'], func_get_args()));
120
121
        return $this;
122
    }
123
124
    /**
125
     * Returns an array of all unique values that results from applying an