@@ -40,7 +40,7 @@ class LuhnAlgorithm {
40
40
41
41
/**
42
42
* Set number that the instance should handle.
43
- * @param sting |int $number Number in string or int format
43
+ * @param string |int $number Number in string or int format
44
44
* @param bool $withCheckDigit [Defaults to true] <br> Is the check digit
45
45
* included in $number?
46
46
*/
@@ -51,7 +51,7 @@ function __construct($number, $withCheckDigit = true) {
51
51
/**
52
52
* Validate according to the Luhn Algorithm
53
53
* @return bool true if valid
54
- * @throws InvalidArgumentException If value is null
54
+ * @throws \ InvalidArgumentException If value is null
55
55
*/
56
56
public function isValid () {
57
57
$ checksum = self ::calculateChecksum ($ this ->number . $ this ->checkDigit , $ this ->nDigits + 1 );
@@ -100,8 +100,8 @@ public static function calculateChecksum($number, $length = 0) {
100
100
101
101
/**
102
102
* Calculate the checkdigit from a number
103
- * @param type $number
104
- * @return type
103
+ * @param string $number
104
+ * @return int
105
105
*/
106
106
public static function calculateCheckDigit ($ number ) {
107
107
// Get the checksum
@@ -160,7 +160,7 @@ public static function toInteger($string) {
160
160
161
161
/**
162
162
* Set number that the instance should handle.
163
- * @param sting |int $number Number in string or int format
163
+ * @param string |int $number Number in string or int format
164
164
* @param bool $withCheckDigit [Defaults to true] <br> Is the check digit
165
165
* included in $number?
166
166
*/
0 commit comments