File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4
4
- ' 7.1'
5
5
- ' 7.2'
6
6
before_script : composer install
7
- script : vendor/bin/phpunit
7
+ script : vendor/bin/phpunit
Original file line number Diff line number Diff line change 1
- # Luhn Algorithm in PHP
1
+ # Luhn Algorithm
2
+
3
+ [ ![ Build Status] ( https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master )] ( https://travis-ci.org/Ekman/Luhn-Algorithm )
2
4
3
5
This is an implementation of the Luhn Algorithm in PHP. The Luhn Algorithm is
4
6
used to validate things like credit cards and national identifcation numbers.
@@ -26,5 +28,5 @@ if ($luhn->isValid(123456789)) {
26
28
27
29
$checkSum = $luhn->calcCheckSum(123456789);
28
30
29
- $checkDigit = $luhn->calcCheckDigit();
31
+ $checkDigit = $luhn->calcCheckDigit(123456789 );
30
32
```
Original file line number Diff line number Diff line change @@ -90,4 +90,4 @@ public function calcChecksum(int $input): int {
90
90
91
91
return $ checkSum ;
92
92
}
93
- }
93
+ }
Original file line number Diff line number Diff line change @@ -81,4 +81,4 @@ public function provideCalcCheckDigit_success() {
81
81
[410321920 , 2 ],
82
82
];
83
83
}
84
- }
84
+ }
You can’t perform that action at this time.
0 commit comments