AbortIfFunctionTypeSpecifyingExtension
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.
at line 36
bool
isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context)
Determine whether the call is a statement-level call of the helper.
at line 47
SpecifiedTypes
specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context)
Narrow the condition to the outcome that lets the call return.
at line 72
void
setTypeSpecifier(TypeSpecifier $typeSpecifier)
Set the type specifier used to narrow the condition.