lib/reek/smell_detectors/feature_envy.rb in reek-4.8.1 vs lib/reek/smell_detectors/feature_envy.rb in reek-4.8.2

- old
+ new

@@ -41,9 +41,10 @@ # might "belong" on another class. # # @return [Array<SmellWarning>] # def sniff + return [] if context.singleton_method? || context.module_function? return [] unless context.references_self? envious_receivers.map do |name, lines| smell_warning( context: context, lines: lines,