ui/data/RD dynamic ruby/model/src/reek/smell_detectors/control_parameter.rb
def sniff(ctx)
        ControlParameterCollector.new(ctx).control_parameters.map do |control_parameter|
          argument = control_parameter.name.to_s
          smell_warning(
            context: ctx,
            lines: control_parameter.lines,
            message: "is controlled by argument '#{argument}'",
            parameters: { argument: argument })
        end
      end
#
# Checks whether the given method chooses its execution path
# by testing the value of one of its parameters.
#
# @return [Array<SmellWarning>]
#
# :reek:FeatureEnvy
Checks whether the given method chooses its execution path
by testing the value of one of its parameters.
Checks whether the given method chooses its execution path by testing the value of one of its parameters .
def sniff(ctx)
        ControlParameterCollector.new(ctx).control_parameters.map do |control_parameter|
          argument = control_parameter.name.to_s
          smell_warning(
            context: ctx,
            lines: control_parameter.lines,
            message: "is controlled by argument '#{argument}'",
            parameters: { argument: argument })
        end
      end
def sniff ( ctx ) ControlParameterCollector . new ( ctx ) . control_parameters . map do | control_parameter | argument = control_parameter . name . to_s smell_warning ( context : ctx , lines : control_parameter . lines , message : "is controlled by argument '#{argument}'" , parameters : { argument : argument } ) end end
Checks whether the given method chooses its execution path
by testing the value of one of its parameters.
Checks whether the given method chooses its execution path by testing the value of one of its parameters .
None
Array<SmellWarning>
ctx