Skip to content

Commit

Permalink
fabot
Browse files Browse the repository at this point in the history
  • Loading branch information
smnandre committed Jul 6, 2024
1 parent bfe1487 commit 64bf498
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TwigComponent/src/Twig/TwigPreLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function preLexComponents(string $input): string
$lastComponentName = $lastComponent['name'];

if ($closingComponentName !== $lastComponentName) {
throw new SyntaxError("Expected closing tag '</twig:{$lastComponentName}>' but found '</twig:{$closingComponentName}>'", $this->line);
throw new SyntaxError("Expected closing tag '</twig:{$lastComponentName}>' but found '</twig:{$closingComponentName}>'.", $this->line);
}

// we've reached the end of this component. If we're inside the
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 64bf498

Please sign in to comment.