You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
// if next line is less indented or equal, then it means that the current value is null
301
301
if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
@@ -443,7 +443,7 @@ private function doParse(string $value, int $flags)
443
443
thrownewParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
444
444
}
445
445
446
-
if (false !== strpos($line, ': ')) {
446
+
if (str_contains($line, ': ')) {
447
447
thrownewParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
448
448
}
449
449
@@ -453,7 +453,7 @@ private function doParse(string $value, int $flags)
453
453
$value .= '';
454
454
}
455
455
456
-
if ('' !== $trimmedLine && '\\' === substr($line, -1)) {
456
+
if ('' !== $trimmedLine && str_ends_with($line, '\\')) {
457
457
$value .= ltrim(substr($line, 0, -1));
458
458
} elseif ('' !== $trimmedLine) {
459
459
$value .= $trimmedLine;
@@ -462,7 +462,7 @@ private function doParse(string $value, int $flags)
462
462
if ('' === $trimmedLine) {
463
463
$previousLineWasNewline = true;
464
464
$previousLineWasTerminatedWithBackslash = false;
465
-
} elseif ('\\' === substr($line, -1)) {
465
+
} elseif (str_ends_with($line, '\\')) {
466
466
$previousLineWasNewline = false;
467
467
$previousLineWasTerminatedWithBackslash = true;
468
468
} else {
@@ -699,7 +699,7 @@ private function moveToPreviousLine(): bool
0 commit comments