File tree 3 files changed +11
-15
lines changed
3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 4
4
composer : stockfiller/composer@0.0.38
5
5
php-cs-fixer : stockfiller/php-cs-fixer@0.0.18
6
6
phpunit : stockfiller/phpunit@0.0.13
7
+ php-coveralls : nekman/php-coveralls@0.0.5
7
8
8
9
executors :
9
10
php74 :
@@ -15,16 +16,6 @@ executors:
15
16
- image : php:8.0-alpine
16
17
resource_class : small
17
18
18
- commands :
19
- install_xdebug :
20
- steps :
21
- - run :
22
- name : Install PCOV and Git
23
- command : |-
24
- apk add --update --no-cache ${PHPIZE_DEPS} git
25
- pecl install pcov-1.0.6
26
- docker-php-ext-enable pcov
27
-
28
19
workflows :
29
20
master :
30
21
jobs :
@@ -47,6 +38,7 @@ workflows:
47
38
executor : php74
48
39
rules : " @PSR2"
49
40
pre-steps :
41
+ - run : apk add --update --no-cache git openssh-client
50
42
- composer/install_bin
51
43
filters : &branch-filters
52
44
branches :
@@ -55,12 +47,14 @@ workflows:
55
47
<< : *unit-tests
56
48
flags : --coverage-clover coverage/clover.xml
57
49
pre-steps :
58
- - install_xdebug
50
+ - run : |-
51
+ apk add --update --no-cache ${PHPIZE_DEPS} git
52
+ pecl install pcov-1.0.6
53
+ docker-php-ext-enable pcov
59
54
- composer/install_bin
60
55
post-steps :
61
- - run : php vendor/bin/php-coveralls --verbose
62
- - store_artifacts :
63
- path : coverage/clover.xml
56
+ - php-coveralls/upload :
57
+ clover-path : coverage/clover.xml
64
58
filters : *branch-filters
65
59
requires :
66
60
- coding-standards
Original file line number Diff line number Diff line change 1
1
# Luhn Algorithm
2
2
3
- [ ![ Build Status] ( https://circleci.com/github /Ekman/luhn-algorithm.svg?style=shield )] ( https://app.circleci.com/pipelines/github/Ekman )
3
+ [ ![ Build Status] ( https://circleci.com/gh /Ekman/luhn-algorithm.svg?style=svg )] ( https://app.circleci.com/pipelines/github/Ekman/luhn-algorithm )
4
4
[ ![ Coverage Status] ( https://coveralls.io/repos/github/Ekman/luhn-algorithm/badge.svg?branch=master )] ( https://coveralls.io/github/Ekman/luhn-algorithm?branch=master )
5
5
6
6
This is a zero dependency implementation of the Luhn Algorithm for PHP 7.0 and above. The Luhn Algorithm is used to validate things like credit cards and national identification numbers. More information on the algorithm can be found at [ Wikipedia] ( http://en.wikipedia.org/wiki/Luhn_algorithm ) .
Original file line number Diff line number Diff line change 27
27
28
28
namespace Nekman \LuhnAlgorithm ;
29
29
30
+ use Nekman \LuhnAlgorithm \Contract \LuhnAlgorithmExceptionInterface ;
30
31
use Nekman \LuhnAlgorithm \Contract \NumberInterface ;
31
32
use Nekman \LuhnAlgorithm \Exceptions \ArgumentIsNotNumericException ;
32
33
use function Nekman \LuhnAlgorithm \Functions \string_is_numeric ;
@@ -59,6 +60,7 @@ public function __construct(string $number, int $checkDigit = null)
59
60
* Create a new number from an input that contains the check digit already
60
61
* @param string $input The input that contains the check digit already.
61
62
* @throws ArgumentIsNotNumericException If the input does not consist entirely of numbers.
63
+ * @throws LuhnAlgorithmExceptionInterface
62
64
* @return self
63
65
*
64
66
*/
You can’t perform that action at this time.
0 commit comments