function ExcludeList::isStaticPropertyExcluded
@psalm-param class-string $className
File
-
vendor/
sebastian/ global-state/ src/ ExcludeList.php, line 67
Class
Namespace
SebastianBergmann\GlobalStateCode
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]);
}