Skip to content

Commit 94a9e77

Browse files
committed
Ruleset: update an error message
1 parent e89075f commit 94a9e77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Ruleset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ public function populateTokenListeners()
14601460

14611461
$tokens = $this->sniffs[$sniffClass]->register();
14621462
if (is_array($tokens) === false) {
1463-
$msg = "The sniff $sniffClass register() method must return an array.";
1463+
$msg = "The sniff {$sniffClass}::register() method must return an array.";
14641464
$this->msgCache->add($msg, MsgCollector::ERROR);
14651465

14661466
// Unregister the sniff.

tests/Core/Ruleset/PopulateTokenListenersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testSniffWhereRegisterDoesNotReturnAnArrayThrowsException()
6262
$config = new ConfigDouble(["--standard=$standard"]);
6363

6464
$sniffClass = 'Fixtures\\TestStandard\\Sniffs\\InvalidSniffs\\RegisterNoArraySniff';
65-
$message = "ERROR: The sniff $sniffClass register() method must return an array.".PHP_EOL.PHP_EOL;
65+
$message = "ERROR: The sniff {$sniffClass}::register() method must return an array.".PHP_EOL.PHP_EOL;
6666
$this->expectRuntimeExceptionMessage($message);
6767

6868
new Ruleset($config);

0 commit comments

Comments
 (0)