Open edhaase opened 8 years ago
There was no implementation for handling callable arrays [$object, "funcName"]
. Basically, the author wanted to call the function directly rather than use call_user_func
.
It would be a simple change to implement, but at the same time it is also very simple to pass in an anonymous function that calls whatever other functions you want.
I agree, using call_user_func would be better, e.g. being able to do: must('file_exists')
I was wondering if there was a particular reason why you're type hinting to \Closure instead of the less restrictive \Callable?