ReflectsClosures
trait ReflectsClosures (View source)
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.
Details
protected string
firstClosureParameterType(Closure $closure)
Get the class name of the first parameter of the given Closure.
protected array
firstClosureParameterTypes(Closure $closure)
Get the class names of the first parameter of the given Closure, including union types.
protected array
closureParameterTypes(Closure $closure)
Get the class names / types of the parameters of the given Closure.