Skip to content

Commit e798e21

Browse files
committed
fix message
1 parent 1311fdd commit e798e21

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ lint:
107107
--exclude tests/PHPStan/Rules/Properties/data/final-property-hooks.php \
108108
--exclude tests/PHPStan/Rules/Properties/data/final-properties.php \
109109
--exclude tests/PHPStan/Rules/Properties/data/property-in-interface-explicit-abstract.php \
110+
--exclude tests/PHPStan/Rules/Constants/data/final-private-const.php \
110111
src tests
111112

112113
cs:

src/Rules/Constants/FinalPrivateConstantRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function processNode(Node $node, Scope $scope): array
3737
$errors = [];
3838
foreach ($node->consts as $classConstNode) {
3939
$errors[] = RuleErrorBuilder::message(sprintf(
40-
'Private constant %s::%s() cannot be final as it is not visible to other classes.',
40+
'Private constant %s::%s() cannot be final as it is never overridden by other classes.',
4141
$classReflection->getDisplayName(),
4242
$classConstNode->name->name,
4343
))->identifier('classConstant.finalPrivate')->build();

tests/PHPStan/Rules/Constants/FinalPrivateConstantRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testRule(): void
1818
{
1919
$this->analyse([__DIR__ . '/data/final-private-const.php'], [
2020
[
21-
'Private constant FinalPrivateConstants\User::FINAL_PRIVATE() cannot be final as it is not visible to other classes.',
21+
'Private constant FinalPrivateConstants\User::FINAL_PRIVATE() cannot be final as it is never overridden by other classes.',
2222
8,
2323
],
2424
]);

0 commit comments

Comments
 (0)