function DeprecatedScopeCheck::inDeprecatedScope
4 calls to DeprecatedScopeCheck::inDeprecatedScope()
- AccessDeprecatedConstant::processNode in vendor/
mglaman/ phpstan-drupal/ src/ Rules/ Deprecations/ AccessDeprecatedConstant.php - RequestStackGetMainRequestRule::processNode in vendor/
mglaman/ phpstan-drupal/ src/ Rules/ Drupal/ RequestStackGetMainRequestRule.php - SymfonyCmfRouteObjectInterfaceConstantsRule::processNode in vendor/
mglaman/ phpstan-drupal/ src/ Rules/ Deprecations/ SymfonyCmfRouteObjectInterfaceConstantsRule.php - SymfonyCmfRoutingInClassMethodSignatureRule::processNode in vendor/
mglaman/ phpstan-drupal/ src/ Rules/ Deprecations/ SymfonyCmfRoutingInClassMethodSignatureRule.php
File
-
vendor/
mglaman/ phpstan-drupal/ src/ Internal/ DeprecatedScopeCheck.php, line 9
Class
Namespace
mglaman\PHPStanDrupal\InternalCode
public static function inDeprecatedScope(Scope $scope) : bool {
$class = $scope->getClassReflection();
if ($class !== null && $class->isDeprecated()) {
return true;
}
$trait = $scope->getTraitReflection();
if ($trait !== null && $trait->isDeprecated()) {
return true;
}
$function = $scope->getFunction();
return $function !== null && $function->isDeprecated()
->yes();
}