Code Duplication    Length = 3-3 lines in 2 locations

src/Eccube/Doctrine/ORM/Query/Extract.php 2 locations

@@ 83-85 (lines=3) @@
80
        $parser->match(Lexer::T_OPEN_PARENTHESIS);
81
82
        $upperField = strtoupper($lexer->lookahead['value']);
83
        if ($lexer->lookahead['type'] !== Lexer::T_IDENTIFIER || !isset($this->formats[$upperField])) {
84
            $parser->syntaxError(implode('/', array_keys($this->formats)));
85
        }
86
87
        $parser->match(Lexer::T_IDENTIFIER);
88
        $this->field = $upperField;
@@ 94-96 (lines=3) @@
91
        $next = $lexer->glimpse();
92
        if (isset($next['type']) && $next['type'] === Lexer::T_STRING) {
93
            $upperType = strtoupper($lexer->lookahead['value']);
94
            if ($lexer->lookahead['type'] !== Lexer::T_IDENTIFIER || !in_array($upperType, $this->dateTimeTypes, true)) {
95
                $parser->syntaxError(implode('/', $this->dateTimeTypes));
96
            }
97
            $parser->match(Lexer::T_IDENTIFIER);
98
            $this->type = $upperType;
99
        }