class GroupLegacyScope
Hierarchy
- class \mglaman\PHPStanDrupal\DeprecatedScope\GroupLegacyScope implements \PHPStan\Rules\Deprecations\DeprecatedScopeResolver
Expanded class hierarchy of GroupLegacyScope
File
-
vendor/
mglaman/ phpstan-drupal/ src/ DeprecatedScope/ GroupLegacyScope.php, line 11
Namespace
mglaman\PHPStanDrupal\DeprecatedScopeView source
final class GroupLegacyScope implements DeprecatedScopeResolver {
public function isScopeDeprecated(Scope $scope) : bool {
if ($scope->isInClass()) {
$class = $scope->getClassReflection();
$phpDoc = $class->getResolvedPhpDoc();
if ($phpDoc !== null && strpos($phpDoc->getPhpDocString(), '@group legacy') !== false) {
return true;
}
}
$function = $scope->getFunction();
return $function !== null && $function->getDocComment() !== null && strpos($function->getDocComment(), '@group legacy') !== false;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
GroupLegacyScope::isScopeDeprecated | public | function | Overrides DeprecatedScopeResolver::isScopeDeprecated |