Add and apply EmptyLineAfterGuardClause rule
We were inconsistent on this one. I consider it particularly useful when a method starts with a `return` statement. In other cases, we probably shouldn't have a guard rule in the middle of a method in any case, but that's a different refactoring.
This commit is contained in:
@@ -45,6 +45,7 @@ class Management::DocumentVerificationsController < Management::BaseController
|
||||
|
||||
def clean_document_number
|
||||
return if params[:document_verification][:document_number].blank?
|
||||
|
||||
params[:document_verification][:document_number] = params[:document_verification][:document_number].gsub(/[^a-z0-9]+/i, "").upcase
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user