/home/techb158/exp.abdallabala.com/vendor/fzaninotto/faker/src/Faker/Calculator
Edit: /home/techb158/exp.abdallabala.com/vendor/fzaninotto/faker/src/Faker/Calculator/TCNo.php (1376B)
$digit) {
if ($index % 2 == 0) {
$evenSum += $digit;
} else {
$oddSum += $digit;
}
}
$tenthDigit = (7 * $evenSum - $oddSum) % 10;
$eleventhDigit = ($evenSum + $oddSum + $tenthDigit) % 10;
return $tenthDigit . $eleventhDigit;
}
/**
* Checks whether an TCNo has a valid checksum
*
* @param string $tcNo
* @return boolean
*/
public static function isValid($tcNo)
{
return self::checksum(substr($tcNo, 0, -2)) === substr($tcNo, -2, 2);
}
}