From 437ac715ee7bd378471a9f95336936ffcbda3e80 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 8 Mar 2024 11:22:36 +0100 Subject: [PATCH] Fix build --- .../FetchingDeprecatedConstRule.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/Rules/Deprecations/FetchingDeprecatedConstRule.php b/src/Rules/Deprecations/FetchingDeprecatedConstRule.php index 8b77ce1..c909203 100644 --- a/src/Rules/Deprecations/FetchingDeprecatedConstRule.php +++ b/src/Rules/Deprecations/FetchingDeprecatedConstRule.php @@ -8,7 +8,6 @@ use PHPStan\Reflection\ReflectionProvider; use PHPStan\Rules\Rule; use function sprintf; -use const PHP_VERSION_ID; /** * @implements Rule @@ -22,19 +21,10 @@ class FetchingDeprecatedConstRule implements Rule /** @var DeprecatedScopeHelper */ private $deprecatedScopeHelper; - /** @var array */ - private $deprecatedConstants = []; - public function __construct(ReflectionProvider $reflectionProvider, DeprecatedScopeHelper $deprecatedScopeHelper) { $this->reflectionProvider = $reflectionProvider; $this->deprecatedScopeHelper = $deprecatedScopeHelper; - - // phpcs:ignore SlevomatCodingStandard.ControlStructures.EarlyExit.EarlyExitNotUsed - if (PHP_VERSION_ID >= 70300) { - $this->deprecatedConstants['FILTER_FLAG_SCHEME_REQUIRED'] = 'Use of constant %s is deprecated since PHP 7.3.'; - $this->deprecatedConstants['FILTER_FLAG_HOST_REQUIRED'] = 'Use of constant %s is deprecated since PHP 7.3.'; - } } public function getNodeType(): string @@ -61,13 +51,6 @@ public function processNode(Node $node, Scope $scope): array )]; } - if (isset($this->deprecatedConstants[$constantReflection->getName()])) { - return [sprintf( - $this->deprecatedConstants[$constantReflection->getName()], - $constantReflection->getName() - )]; - } - return []; }