Code Duplication    Length = 8-8 lines in 2 locations

lib/Doctrine/ORM/QueryBuilder.php 2 locations

@@ 1065-1072 (lines=8) @@
1062
     *
1063
     * @return self
1064
     */
1065
    public function where($predicates)
1066
    {
1067
        if ( ! (func_num_args() == 1 && $predicates instanceof Expr\Composite)) {
1068
            $predicates = new Expr\Andx(func_get_args());
1069
        }
1070
1071
        return $this->add('where', $predicates);
1072
    }
1073
1074
    /**
1075
     * Adds one or more restrictions to the query results, forming a logical
@@ 1188-1195 (lines=8) @@
1185
     *
1186
     * @return self
1187
     */
1188
    public function having($having)
1189
    {
1190
        if ( ! (func_num_args() == 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
1191
            $having = new Expr\Andx(func_get_args());
1192
        }
1193
1194
        return $this->add('having', $having);
1195
    }
1196
1197
    /**
1198
     * Adds a restriction over the groups of the query, forming a logical