private function getLineNumber(): int
    {
        $pos = $this->stringIterator->key();
        $this->stringIterator->rewind();
        $lineNo = 1;

        while ($this->stringIterator->key() < $pos) {
            if ($this->stringIterator->is(Tokens::LINE_FEED)) {
                ++$lineNo;
            }
            $this->stringIterator->next();
        }

        return $lineNo;
    }
private function getLineNumber(): int
    {
        $pos = $this->stringIterator->key();
        $this->stringIterator->rewind();
        $lineNo = 1;

        while ($this->stringIterator->key() < $pos) {
            if ($this->stringIterator->is(Tokens::LINE_FEED)) {
                ++$lineNo;
            }
            $this->stringIterator->next();
        }

        return $lineNo;
    }
private function getLineNumber ( ) : int { $ pos = $ this -> stringIterator -> key ( ) ; $ this -> stringIterator -> rewind ( ) ; $ lineNo = 1 ; while ( $ this -> stringIterator -> key ( ) < $ pos ) { if ( $ this -> stringIterator -> is ( Tokens :: LINE_FEED ) ) { ++ $ lineNo ; } $ this -> stringIterator -> next ( ) ; } return $ lineNo ; }
Get line number of current entry on the StringIterator.

@return int
Get line number of current entry on the StringIterator .