Commit e7c32fc4 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Refactor guard clause

parent df294aa2
......@@ -42,7 +42,10 @@ module Security
end
def create_vulnerability_finding(finding)
return put_warning_for(finding) && nil unless finding.valid?
unless finding.valid?
put_warning_for(finding)
return
end
vulnerability_params = finding.to_hash.except(:compare_key, :identifiers, :location, :scanner)
vulnerability_finding = create_or_find_vulnerability_finding(finding, vulnerability_params)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment