private function getLocationCoordinates(Lexer $lexer, bool $end = false, string $content = '') : array
    {
        $lineNumber  = $lexer->yylineno;
        $lineContent = $this->fileLines[$lineNumber];

        if ('' === $content) {
            $content = $lexer->yytext;
        }

        $position = mb_strpos($lineContent, $content);

        if (true === $end) {
            $position += mb_strlen($content);
        }

        return ['line' => $lineNumber + 1, 'column' => $position];
    }
private function getLocationCoordinates(Lexer $lexer, bool $end = false, string $content = '') : array
    {
        $lineNumber  = $lexer->yylineno;
        $lineContent = $this->fileLines[$lineNumber];

        if ('' === $content) {
            $content = $lexer->yytext;
        }

        $position = mb_strpos($lineContent, $content);

        if (true === $end) {
            $position += mb_strlen($content);
        }

        return ['line' => $lineNumber + 1, 'column' => $position];
    }
private function getLocationCoordinates ( Lexer $ lexer , bool $ end = false , string $ content = '' ) : array { $ lineNumber = $ lexer -> yylineno ; $ lineContent = $ this -> fileLines [ $ lineNumber ] ; if ( '' === $ content ) { $ content = $ lexer -> yytext ; } $ position = mb_strpos ( $ lineContent , $ content ) ; if ( true === $ end ) { $ position += mb_strlen ( $ content ) ; } return [ 'line' => $ lineNumber + 1 , 'column' => $ position ] ; }
Builds the location object for the current position in the JSON file

@param Lexer  $lexer
@param bool   $end
@param string $content

@return array
Builds the location object for the current position in the JSON file