Skip to content

Commit 4b3a887

Browse files
💄 Improve error message
1 parent e973722 commit 4b3a887

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TwigCS/Sniff/Standard/DelimiterSpacingSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function processStart(Token $token, $tokenPosition, $tokens)
6262
if (1 !== $count) {
6363
$this->addMessage(
6464
$this::MESSAGE_TYPE_ERROR,
65-
sprintf('Expecting 1 whitespace AFTER start of expression eg. "{{" or "{%%"; found %d', $count),
65+
sprintf('Expecting 1 whitespace after "%s"; found %d', $token->getValue(), $count),
6666
$token
6767
);
6868
}
@@ -91,7 +91,7 @@ public function processEnd(Token $token, $tokenPosition, $tokens)
9191
if (1 !== $count) {
9292
$this->addMessage(
9393
$this::MESSAGE_TYPE_ERROR,
94-
sprintf('Expecting 1 whitespace BEFORE end of expression eg. "}}" or "%%}"; found %d', $count),
94+
sprintf('Expecting 1 whitespace before "%s"; found %d', $token->getValue(), $count),
9595
$token
9696
);
9797
}

TwigCS/Sniff/Standard/ForbidCommentedCodeSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function process(Token $token, $tokenPosition, $tokens)
4444
if ($found) {
4545
$this->addMessage(
4646
$this::MESSAGE_TYPE_WARNING,
47-
'Probable commented code found; keeping commented code is usually not advised',
47+
'Probable commented code found; keeping commented code is not advised',
4848
$token
4949
);
5050
}

0 commit comments

Comments
 (0)