lib/reek/context/method_context.rb in reek-3.3.1 vs lib/reek/context/method_context.rb in reek-3.4.0
- old
+ new
@@ -3,26 +3,21 @@
module Reek
module Context
#
# A context wrapper for any method definition found in a syntax tree.
#
- # @api private
class MethodContext < CodeContext
attr_reader :refs
- def envious_receivers
- return {} if refs.self_is_max?
- refs.most_popular
- end
-
def references_self?
exp.depends_on_instance?
end
def uses_param?(param)
local_nodes(:lvar).find { |node| node.var_name == param.to_sym }
end
+ # :reek:FeatureEnvy
def unused_params
exp.arguments.select do |param|
next if param.anonymous_splat?
next if param.marked_unused?
!uses_param? param.plain_name