trait InfersFactoryHelperCalls

internal  
 

Methods

Type
getFactoryHelperType(FuncCall $functionCall, Closure $factoryType, Type $resultType)

Get the type of a helper that returns its factory only when called without arguments.

Details

at line 23
protected Type getFactoryHelperType(FuncCall $functionCall, Closure $factoryType, Type $resultType)

Get the type of a helper that returns its factory only when called without arguments.

An explicit null still makes a result, so the helper's conditional return type on its first parameter cannot tell the cases apart. Unpacked arguments may be empty.

Parameters

FuncCall $functionCall
Closure $factoryType

called only when the call can return the factory

Type $resultType

Return Value

Type