Code Duplication    Length = 19-24 lines in 2 locations

lib/Doctrine/ORM/Query/Parser.php 2 locations

@@ 2618-2641 (lines=24) @@
2615
     *
2616
     * @return \Doctrine\ORM\Query\AST\CollectionMemberExpression
2617
     */
2618
    public function CollectionMemberExpression()
2619
    {
2620
        $not        = false;
2621
        $entityExpr = $this->EntityExpression();
2622
2623
        if ($this->lexer->isNextToken(Lexer::T_NOT)) {
2624
            $this->match(Lexer::T_NOT);
2625
2626
            $not = true;
2627
        }
2628
2629
        $this->match(Lexer::T_MEMBER);
2630
2631
        if ($this->lexer->isNextToken(Lexer::T_OF)) {
2632
            $this->match(Lexer::T_OF);
2633
        }
2634
2635
        $collMemberExpr = new AST\CollectionMemberExpression(
2636
            $entityExpr, $this->CollectionValuedPathExpression()
2637
        );
2638
        $collMemberExpr->not = $not;
2639
2640
        return $collMemberExpr;
2641
    }
2642
2643
    /**
2644
     * Literal ::= string | char | integer | float | boolean
@@ 3277-3295 (lines=19) @@
3274
     *
3275
     * @return \Doctrine\ORM\Query\AST\ExistsExpression
3276
     */
3277
    public function ExistsExpression()
3278
    {
3279
        $not = false;
3280
3281
        if ($this->lexer->isNextToken(Lexer::T_NOT)) {
3282
            $this->match(Lexer::T_NOT);
3283
            $not = true;
3284
        }
3285
3286
        $this->match(Lexer::T_EXISTS);
3287
        $this->match(Lexer::T_OPEN_PARENTHESIS);
3288
3289
        $existsExpression = new AST\ExistsExpression($this->Subselect());
3290
        $existsExpression->not = $not;
3291
3292
        $this->match(Lexer::T_CLOSE_PARENTHESIS);
3293
3294
        return $existsExpression;
3295
    }
3296
3297
    /**
3298
     * ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!="