ReflectsClosures
trait ReflectsClosures
Methods
string
firstClosureParameterType(Closure $closure)
Get the class name of the first parameter of the given Closure.
array
firstClosureParameterTypes(Closure $closure)
Get the class names of the first parameter of the given Closure, including union types.
array
closureParameterTypes(Closure $closure)
Get the class names / types of the parameters of the given Closure.
array
closureReturnTypes(Closure $closure)
Get the class names / types of the return type of the given Closure.
Details
at line 25
protected string
firstClosureParameterType(Closure $closure)
Get the class name of the first parameter of the given Closure.
at line 48
protected array
firstClosureParameterTypes(Closure $closure)
Get the class names of the first parameter of the given Closure, including union types.
at line 74
protected array
closureParameterTypes(Closure $closure)
Get the class names / types of the parameters of the given Closure.
at line 94
protected array
closureReturnTypes(Closure $closure)
Get the class names / types of the return type of the given Closure.