In about 12 places in this module, we call a variable function like this:

$function(…);

However, much better is this syntax:

call_user_func($function, …)

This would be better since it also allows calling of object/class methods, and thereby an object-oriented programming style. There are really no reasons to have the former syntax, as far as I can see, except maybe for aesthetical ones. (Not to say that I haven't used the former syntax myself – but now with D8, it happens more and more that you want to use methods instead of functions for callbacks, and it's currently just not possible with the Entity API in a lot of places.)

Comments

drunken monkey created an issue.