Skip to content

Commit

Permalink
Removing the second argument passing for Validation::luhn()
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 2, 2016
1 parent 6ae503d commit 0f492a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Validation/Validation.php
Expand Up @@ -169,7 +169,7 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null)

if ($regex !== null) {
if (static::_check($check, $regex)) {
return !$deep || static::luhn($check, $deep);
return !$deep || static::luhn($check);
}
}
$cards = [
Expand All @@ -196,22 +196,22 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null)
$regex = $cards['all'][strtolower($value)];

if (static::_check($check, $regex)) {
return static::luhn($check, $deep);
return static::luhn($check);
}
}
} elseif ($type === 'all') {
foreach ($cards['all'] as $value) {
$regex = $value;

if (static::_check($check, $regex)) {
return static::luhn($check, $deep);
return static::luhn($check);
}
}
} else {
$regex = $cards['fast'];

if (static::_check($check, $regex)) {
return static::luhn($check, $deep);
return static::luhn($check);
}
}
return false;
Expand Down

0 comments on commit 0f492a7

Please sign in to comment.