InfersBoundHelperCalls
trait InfersBoundHelperCalls
| internal |
Traits
Methods
Get the type of a helper call whose unpacked lists may all be empty, leaving the first parameter at its default.
Get the helper's declared return type for the call, with the contract it resolves replaced by the booted binding.
Details
in
InfersUnpackedHelperCalls at line 26
protected Type|null
getUnpackedHelperType(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope, Type|null $defaultType = null)
Get the type of a helper call whose unpacked lists may all be empty, leaving the first parameter at its default.
Returns null when the call is not of that form, so the declared return type applies.
at line 31
protected Type
getBoundHelperType(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope, string $contract, Closure $boundType)
Get the helper's declared return type for the call, with the contract it resolves replaced by the booted binding.
The declared conditional return already describes which arguments return the contract, including an explicit null, named and maybe-null arguments. Unpacked lists that may be empty also return it.