abstract class AbstractCallableCheck extends AbstractReflectionCheck (View source)

Base class for checks that look up functions or methods by their entity ID.

Provides findCallable() which handles both "functionName" and "ClassName::methodName" formats, and correctly selects the version-appropriate overload when multiple function definitions exist for the same ID.

Properties

protected ReflectionProviderInterface $reflectionProvider from  AbstractReflectionCheck
protected KnownProblemsRegistry $knownProblemsRegistry from  AbstractReflectionCheck
protected EntityLookupService $entityLookup

Methods

__construct(ReflectionProviderInterface|null $reflectionProvider = null, KnownProblemsRegistry|null $knownProblemsRegistry = null, EntityLookupService|null $entityLookup = null)

No description

bool
skipWithKnownProblem(CheckResultSet $results, string $entityType, string $entityId, string $checkName, string $phpVersion)

Records a skipped-success result if a known problem covers this entity, and returns true.

findCallable(StubDataQueryInterface $storage, string $entityId, string $phpVersion)

Find a function or method in the given storage.

Details

__construct(ReflectionProviderInterface|null $reflectionProvider = null, KnownProblemsRegistry|null $knownProblemsRegistry = null, EntityLookupService|null $entityLookup = null)

No description

Parameters

ReflectionProviderInterface|null $reflectionProvider
KnownProblemsRegistry|null $knownProblemsRegistry
EntityLookupService|null $entityLookup

protected bool skipWithKnownProblem(CheckResultSet $results, string $entityType, string $entityId, string $checkName, string $phpVersion)

Records a skipped-success result if a known problem covers this entity, and returns true.

Returns false if validation should proceed normally.

Parameters

CheckResultSet $results
string $entityType
string $entityId
string $checkName
string $phpVersion

Return Value

bool

protected PHPFunction|null findCallable(StubDataQueryInterface $storage, string $entityId, string $phpVersion)

Find a function or method in the given storage.

Parameters

StubDataQueryInterface $storage
string $entityId

Format: "functionName" or "ClassName::methodName"

string $phpVersion

Return Value

PHPFunction|null