Since Moodle 2.3, many functions contain type hints for their arguments. As an example, lib/moodlelib.php defines delete_user:
function delete_user(stdClass $user)
Why is stdClass used as a type hint here? The reason I'm asking is if I want to call this function with an object of my own custom class, I have to do crazy things like:
user_delete_user((object) ((array) $user_object));
- where $user_object is an instance of, say, 'my_own_user_class'.