Skip inspection if the function declaration is inside a type declaration

This fixes the inspection for unused parameters when the function is inside a type declaration.