Skip to content

Commit

Permalink
For readability replace unless with if
Browse files Browse the repository at this point in the history
  • Loading branch information
DamirSvrtan committed Feb 5, 2020
1 parent ffaa26f commit 7a6d4d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fasterer/scanners/method_call_scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def check_symbol_to_proc
return unless body_method_call.arguments.count.zero?
return if body_method_call.has_block?
return if body_method_call.receiver.nil?
return unless body_method_call.receiver.name == method_call.block_argument_names.first
return if body_method_call.receiver.name != method_call.block_argument_names.first

add_offense(:block_vs_symbol_to_proc)
end
Expand Down

0 comments on commit 7a6d4d4

Please sign in to comment.