parent
6140c94a33
commit
3030c81f03
@ -103,13 +103,7 @@ class Hixie76 implements VersionInterface {
|
||||
}
|
||||
|
||||
public function generateKeyNumber($key) {
|
||||
if (0 === substr_count($key, ' ')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$int = (int)preg_replace('[\D]', '', $key) / substr_count($key, ' ');
|
||||
|
||||
return (is_int($int)) ? $int : '';
|
||||
return preg_replace('[\D]', '', $key) / substr_count($key, ' ');
|
||||
}
|
||||
|
||||
protected function sign($key1, $key2, $code) {
|
||||
|
@ -31,11 +31,7 @@ class Hixie76Test extends \PHPUnit_Framework_TestCase {
|
||||
public static function keyProvider() {
|
||||
return array(
|
||||
array(179922739, '17 9 G`ZD9 2 2b 7X 3 /r90')
|
||||
, array('', '17 9 G`ZD9 2 2b 7X 3 /r91')
|
||||
, array(906585445, '3e6b263 4 17 80')
|
||||
, array('', '3e6b263 4 17 80')
|
||||
, array('', '3e6b63 4 17 80')
|
||||
, array('', '3e6b6341780')
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user