dgilperez/spanish_vat_validators

View on GitHub
lib/spanish_vat_validators.rb

Summary

Maintainability
A
1 hr
Test Coverage

Showing 1 of 1 total issue

Method validate_cif has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def validate_cif(v)
return false if v.nil? || v.empty?
value = v.clone
return false unless value.match(/^[a-wyz][0-9]{7}[0-9a-z]$/i)
even = 0
Severity: Minor
Found in lib/spanish_vat_validators.rb - About 1 hr to fix
Category
Status