Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Writer/Excel5/Parser.php 2 locations

@@ 997-1001 (lines=5) @@
994
        while ($i < $formula_length) {
995
            $token .= $this->formula{$i};
996
997
            if ($i < ($formula_length - 1)) {
998
                $this->lookAhead = $this->formula{$i + 1};
999
            } else {
1000
                $this->lookAhead = '';
1001
            }
1002
1003
            if ($this->match($token) != '') {
1004
                $this->currentCharacter = $i + 1;
@@ 1010-1014 (lines=5) @@
1007
                return 1;
1008
            }
1009
1010
            if ($i < ($formula_length - 2)) {
1011
                $this->lookAhead = $this->formula{$i + 2};
1012
            } else { // if we run out of characters lookAhead becomes empty
1013
                $this->lookAhead = '';
1014
            }
1015
            ++$i;
1016
        }
1017
        //die("Lexical error ".$this->currentCharacter);