File tree Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 44 composer : stockfiller/composer@0.0.38
55 php-cs-fixer : stockfiller/php-cs-fixer@0.0.18
66 phpunit : stockfiller/phpunit@0.0.13
7+ php-coveralls : nekman/php-coveralls@0.0.5
78
89executors :
910 php74 :
@@ -15,16 +16,6 @@ executors:
1516 - image : php:8.0-alpine
1617 resource_class : small
1718
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-
2819workflows :
2920 master :
3021 jobs :
@@ -47,6 +38,7 @@ workflows:
4738 executor : php74
4839 rules : " @PSR2"
4940 pre-steps :
41+ - run : apk add --update --no-cache git openssh-client
5042 - composer/install_bin
5143 filters : &branch-filters
5244 branches :
@@ -55,12 +47,14 @@ workflows:
5547 << : *unit-tests
5648 flags : --coverage-clover coverage/clover.xml
5749 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
5954 - composer/install_bin
6055 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
6458 filters : *branch-filters
6559 requires :
6660 - coding-standards
Original file line number Diff line number Diff line change 11# Luhn Algorithm
22
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 )
44[ ![ Coverage Status] ( https://coveralls.io/repos/github/Ekman/luhn-algorithm/badge.svg?branch=master )] ( https://coveralls.io/github/Ekman/luhn-algorithm?branch=master )
55
66This 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 2727
2828namespace Nekman \LuhnAlgorithm ;
2929
30+ use Nekman \LuhnAlgorithm \Contract \LuhnAlgorithmExceptionInterface ;
3031use Nekman \LuhnAlgorithm \Contract \NumberInterface ;
3132use Nekman \LuhnAlgorithm \Exceptions \ArgumentIsNotNumericException ;
3233use function Nekman \LuhnAlgorithm \Functions \string_is_numeric ;
@@ -59,6 +60,7 @@ public function __construct(string $number, int $checkDigit = null)
5960 * Create a new number from an input that contains the check digit already
6061 * @param string $input The input that contains the check digit already.
6162 * @throws ArgumentIsNotNumericException If the input does not consist entirely of numbers.
63+ * @throws LuhnAlgorithmExceptionInterface
6264 * @return self
6365 *
6466 */
You can’t perform that action at this time.
0 commit comments