change from exception to bool return

This commit is contained in:
Dennis Eichhorn 2019-11-03 23:20:20 +01:00
parent 16f8566ac3
commit e8e31758c1

View File

@ -33,7 +33,7 @@ final class CreditCard extends ValidatorAbstract
public static function isValid($value, array $constraints = null) : bool
{
if (!\is_string($value)) {
throw new \InvalidArgumentException();
return false;
}
$value = \preg_replace('/\D/', '', $value) ?? '';