@@ -157,7 +157,7 @@ public function preLexComponents(string $input): string
157157 $ lastComponentName = $ lastComponent ['name ' ];
158158
159159 if ($ closingComponentName !== $ lastComponentName ) {
160- throw new SyntaxError ("Expected closing tag '</twig: {$ lastComponentName }>' but found '</twig: {$ closingComponentName }>' " , $ this ->line );
160+ throw new SyntaxError ("Expected closing tag '</twig: {$ lastComponentName }>' but found '</twig: {$ closingComponentName }>'. " , $ this ->line );
161161 }
162162
163163 // we've reached the end of this component. If we're inside the
@@ -303,13 +303,13 @@ private function consume(string $string): bool
303303 private function consumeChar ($ validChars = null ): string
304304 {
305305 if ($ this ->position >= $ this ->length ) {
306- throw new SyntaxError ('Unexpected end of input ' , $ this ->line );
306+ throw new SyntaxError ('Unexpected end of input. ' , $ this ->line );
307307 }
308308
309309 $ char = $ this ->input [$ this ->position ];
310310
311311 if (null !== $ validChars && !\in_array ($ char , (array ) $ validChars , true )) {
312- throw new SyntaxError ('Expected one of [ ' .implode ('' , (array ) $ validChars )."] but found ' {$ char }'. " , $ this ->line );
312+ throw new SyntaxError ('Expected one of [. ' .implode ('' , (array ) $ validChars )."] but found ' {$ char }'. " , $ this ->line );
313313 }
314314
315315 ++$ this ->position ;
@@ -358,7 +358,7 @@ private function consumeWhitespace(): void
358358 private function expectAndConsumeChar (string $ char ): void
359359 {
360360 if (1 !== \strlen ($ char )) {
361- throw new \InvalidArgumentException ('Expected a single character ' );
361+ throw new \InvalidArgumentException ('Expected a single character. ' );
362362 }
363363
364364 if ($ this ->position >= $ this ->length ) {
0 commit comments