Skip to content

Commit 7bdf21f

Browse files
authored
Update FetchingDeprecatedConstRule.php
1 parent 914c542 commit 7bdf21f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Rules/Deprecations/FetchingDeprecatedConstRule.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,17 @@ public function processNode(Node $node, Scope $scope): array
4949
}
5050

5151
$constantReflection = $this->reflectionProvider->getConstant($node->name, $scope);
52-
$defaultMessage = 'Use of constant %s is deprecated.';
5352

5453
if ($constantReflection->isDeprecated()->yes()) {
5554
return [sprintf(
56-
$constantReflection->getDeprecatedDescription() ?? $defaultMessage,
55+
$constantReflection->getDeprecatedDescription() ?? 'Use of constant %s is deprecated.',
5756
$constantReflection->getName()
5857
)];
5958
}
6059

6160
if (isset($this->deprecatedConstants[$constantReflection->getName()])) {
6261
return [sprintf(
63-
$this->deprecatedConstants[$constantReflection->getName()] ?? $defaultMessage,
62+
$this->deprecatedConstants[$constantReflection->getName()],
6463
$constantReflection->getName()
6564
)];
6665
}

0 commit comments

Comments
 (0)