function Lexer::getFullUpcomingInput
Return value
string
File
-
vendor/
seld/ jsonlint/ src/ Seld/ JsonLint/ Lexer.php, line 179
Class
- Lexer
- Lexer class
Namespace
Seld\JsonLintCode
public function getFullUpcomingInput() {
$next = $this->match;
if (substr($next, 0, 1) === '"' && substr_count($next, '"') === 1) {
$len = \strlen($this->input);
if ($len === $this->offset) {
$strEnd = $len;
}
else {
$strEnd = min(strpos($this->input, '"', $this->offset + 1) ?: $len, strpos($this->input, "\n", $this->offset + 1) ?: $len);
}
$next .= substr($this->input, $this->offset, $strEnd - $this->offset);
}
elseif (\strlen($next) < 20) {
$next .= substr($this->input, $this->offset, 20 - \strlen($next));
}
return $next;
}