Code Duplication    Length = 10-10 lines in 2 locations

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

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