Code Duplication    Length = 8-8 lines in 2 locations

lib/Doctrine/ORM/QueryBuilder.php 2 locations

@@ 1077-1084 (lines=8) @@
1074
     *
1075
     * @return self
1076
     */
1077
    public function where($predicates)
1078
    {
1079
        if ( ! (func_num_args() == 1 && $predicates instanceof Expr\Composite)) {
1080
            $predicates = new Expr\Andx(func_get_args());
1081
        }
1082
1083
        return $this->add('where', $predicates);
1084
    }
1085
1086
    /**
1087
     * Adds one or more restrictions to the query results, forming a logical
@@ 1200-1207 (lines=8) @@
1197
     *
1198
     * @return self
1199
     */
1200
    public function having($having)
1201
    {
1202
        if ( ! (func_num_args() == 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
1203
            $having = new Expr\Andx(func_get_args());
1204
        }
1205
1206
        return $this->add('having', $having);
1207
    }
1208
1209
    /**
1210
     * Adds a restriction over the groups of the query, forming a logical