Fix sniff for function definitions, class methods, and namespaced function calls