From 64bf49811457d98ad04d9ce258ca2ce55b00bc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Sat, 6 Jul 2024 09:31:18 +0200 Subject: [PATCH] fabot --- src/TwigComponent/src/Twig/TwigPreLexer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TwigComponent/src/Twig/TwigPreLexer.php b/src/TwigComponent/src/Twig/TwigPreLexer.php index a3ce7670e55..2e0fdbe7199 100644 --- a/src/TwigComponent/src/Twig/TwigPreLexer.php +++ b/src/TwigComponent/src/Twig/TwigPreLexer.php @@ -157,7 +157,7 @@ public function preLexComponents(string $input): string $lastComponentName = $lastComponent['name']; if ($closingComponentName !== $lastComponentName) { - throw new SyntaxError("Expected closing tag '' but found ''", $this->line); + throw new SyntaxError("Expected closing tag '' but found ''.", $this->line); } // we've reached the end of this component. If we're inside the @@ -303,13 +303,13 @@ private function consume(string $string): bool private function consumeChar($validChars = null): string { if ($this->position >= $this->length) { - throw new SyntaxError('Unexpected end of input', $this->line); + throw new SyntaxError('Unexpected end of input.', $this->line); } $char = $this->input[$this->position]; if (null !== $validChars && !\in_array($char, (array) $validChars, true)) { - throw new SyntaxError('Expected one of ['.implode('', (array) $validChars)."] but found '{$char}'.", $this->line); + throw new SyntaxError('Expected one of [.'.implode('', (array) $validChars)."] but found '{$char}'.", $this->line); } ++$this->position; @@ -358,7 +358,7 @@ private function consumeWhitespace(): void private function expectAndConsumeChar(string $char): void { if (1 !== \strlen($char)) { - throw new \InvalidArgumentException('Expected a single character'); + throw new \InvalidArgumentException('Expected a single character.'); } if ($this->position >= $this->length) {