Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GroupLegacyScope.php

function GroupLegacyScope::isScopeDeprecated

Overrides DeprecatedScopeResolver::isScopeDeprecated

File

vendor/mglaman/phpstan-drupal/src/DeprecatedScope/GroupLegacyScope.php, line 14

Class

GroupLegacyScope

Namespace

mglaman\PHPStanDrupal\DeprecatedScope

Code

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;
}
RSS feed
Powered by Drupal