SourceFiles
class SourceFiles
| internal |
Finds the files that values read through reflection come from, for result cache dependencies.
PHPStan analyzes the dependents of a class again only when its declarations change. Property defaults and method bodies are not part of them, and a changed constant reaches only the files naming its class.
Methods
Get the files declaring a class and its parents below a base class, with the traits each uses.
Get the files an instance's property defaults and method bodies come from: those declaring the class and its parents below a base class, with their traits, and those of the constants the defaults read.
Get the files a constant read through a class takes its value from: those declaring the class and its parents up to the declaring class, as any of them can override it, and those of the constants it reads.
Get the files of the constants the arguments of a class's or trait's attribute read, or those of the attribute on one of its methods.
Get the files a method parameter's declared default comes from: the one declaring the method and those of the constants the default reads.
Details
at line 34
static array
forClass(ClassReflection $classReflection, string|null $baseClass)
Get the files declaring a class and its parents below a base class, with the traits each uses.
at line 69
static array
forInstance(ReflectionProvider $reflectionProvider, ClassReflection $classReflection, string|null $baseClass)
Get the files an instance's property defaults and method bodies come from: those declaring the class and its parents below a base class, with their traits, and those of the constants the defaults read.
at line 102
static array
forConstant(ReflectionProvider $reflectionProvider, ClassReflection $classReflection, string $name)
Get the files a constant read through a class takes its value from: those declaring the class and its parents up to the declaring class, as any of them can override it, and those of the constants it reads.
at line 118
static array
forAttributeArguments(ReflectionProvider $reflectionProvider, ClassReflection $classReflection, string $attributeClass, string|null $method = null)
Get the files of the constants the arguments of a class's or trait's attribute read, or those of the attribute on one of its methods.
at line 140
static array
forParameterDefault(ReflectionProvider $reflectionProvider, ClassReflection $classReflection, string $method, string $parameter)
Get the files a method parameter's declared default comes from: the one declaring the method and those of the constants the default reads.