class AbortIfFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension

Methods

__construct(bool $negate, string $methodName)

Create an extension for the "_if" or negated "_unless" form of the given helper.

bool
isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context)

Determine whether the call is a statement-level call of the helper.

SpecifiedTypes
specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context)

Narrow the condition to the outcome that lets the call return.

void
setTypeSpecifier(TypeSpecifier $typeSpecifier)

Set the type specifier used to narrow the condition.

Details

at line 28
__construct(bool $negate, string $methodName)

Create an extension for the "_if" or negated "_unless" form of the given helper.

Parameters

bool $negate
string $methodName

at line 36
bool isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context)

Determine whether the call is a statement-level call of the helper.

Parameters

FunctionReflection $functionReflection
FuncCall $node
TypeSpecifierContext $context

Return Value

bool

at line 47
SpecifiedTypes specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context)

Narrow the condition to the outcome that lets the call return.

Parameters

FunctionReflection $functionReflection
FuncCall $node
Scope $scope
TypeSpecifierContext $context

Return Value

SpecifiedTypes

at line 72
void setTypeSpecifier(TypeSpecifier $typeSpecifier)

Set the type specifier used to narrow the condition.

Parameters

TypeSpecifier $typeSpecifier

Return Value

void