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

Breadcrumb

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

function ExcludeList::isStaticPropertyExcluded

@psalm-param class-string $className

File

vendor/sebastian/global-state/src/ExcludeList.php, line 67

Class

ExcludeList

Namespace

SebastianBergmann\GlobalState

Code

public function isStaticPropertyExcluded(string $className, string $propertyName) : bool {
    if (in_array($className, $this->classes, true)) {
        return true;
    }
    foreach ($this->classNamePrefixes as $prefix) {
        if (str_starts_with($className, $prefix)) {
            return true;
        }
    }
    $class = new ReflectionClass($className);
    foreach ($this->parentClasses as $type) {
        if ($class->isSubclassOf($type)) {
            return true;
        }
    }
    foreach ($this->interfaces as $type) {
        if ($class->implementsInterface($type)) {
            return true;
        }
    }
    return isset($this->staticProperties[$className][$propertyName]);
}
RSS feed
Powered by Drupal