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
* 4.4:
Add missing dots at the end of exception messages
[DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
Fix bad merge
Add missing dots at the end of exception messages
Copy file name to clipboardExpand all lines: Parser.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ public function parse(TokenStream $stream, array $names = [])
96
96
97
97
$node = $this->parseExpression();
98
98
if (!$stream->isEOF()) {
99
-
thrownewSyntaxError(sprintf('Unexpected token "%s" of value "%s"', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
99
+
thrownewSyntaxError(sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
100
100
}
101
101
102
102
return$node;
@@ -192,13 +192,13 @@ public function parsePrimaryExpression()
192
192
default:
193
193
if ('(' === $this->stream->current->value) {
194
194
if (false === isset($this->functions[$token->value])) {
195
-
thrownewSyntaxError(sprintf('The function "%s" does not exist', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, array_keys($this->functions));
195
+
thrownewSyntaxError(sprintf('The function "%s" does not exist.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, array_keys($this->functions));
if (!\in_array($token->value, $this->names, true)) {
201
-
thrownewSyntaxError(sprintf('Variable "%s" is not valid', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, $this->names);
201
+
thrownewSyntaxError(sprintf('Variable "%s" is not valid.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, $this->names);
202
202
}
203
203
204
204
// is the name used in the compiled code different
@@ -224,7 +224,7 @@ public function parsePrimaryExpression()
thrownewSyntaxError(sprintf('Unexpected token "%s" of value "%s"', $token->type, $token->value), $token->cursor, $this->stream->getExpression());
227
+
thrownewSyntaxError(sprintf('Unexpected token "%s" of value "%s".', $token->type, $token->value), $token->cursor, $this->stream->getExpression());
228
228
}
229
229
}
230
230
@@ -286,7 +286,7 @@ public function parseHashExpression()
286
286
} else {
287
287
$current = $this->stream->current;
288
288
289
-
thrownewSyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s"', $current->type, $current->value), $current->cursor, $this->stream->getExpression());
289
+
thrownewSyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', $current->type, $current->value), $current->cursor, $this->stream->getExpression());
290
290
}
291
291
292
292
$this->stream->expect(Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
@@ -324,7 +324,7 @@ public function parsePostfixExpression(Node\Node $node)
324
324
// As a result, if $token is NOT an operator OR $token->value is NOT a valid property or method name, an exception shall be thrown.
0 commit comments