public static function appendVerhoeff($n, $c) { for (; $c > 0; $c--) { $n .= Verhoeff::get($n); } return $n; }
/** * @dataProvider isValidCheckDigitProvider * @param $num string the number to validate * @param $expectedResult bool whether the provided number is valid or not */ public function testIsValidCheckDigit($num, $expectedResult) { $algorithm = new Verhoeff(); $this->assertEquals($expectedResult, $algorithm->isCheckDigitValid($num)); }