Skip to content

Commit 6e6f0ad

Browse files
EkmanCircleCI
and
CircleCI
authored
CircleCI cleanup and bugfixes (#36)
* fix * fix * fix * fix * fix * fix * fix * fix * [CircleCI] Fix coding standards * fix * fix Co-authored-by: CircleCI <[email protected]>
1 parent 291ac89 commit 6e6f0ad

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.circleci/config.yml

+8-14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ orbs:
44
composer: stockfiller/[email protected]
55
php-cs-fixer: stockfiller/[email protected]
66
phpunit: stockfiller/[email protected]
7+
php-coveralls: nekman/[email protected]
78

89
executors:
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-
2819
workflows:
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

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

66
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).

src/Number.php

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
namespace Nekman\LuhnAlgorithm;
2929

30+
use Nekman\LuhnAlgorithm\Contract\LuhnAlgorithmExceptionInterface;
3031
use Nekman\LuhnAlgorithm\Contract\NumberInterface;
3132
use Nekman\LuhnAlgorithm\Exceptions\ArgumentIsNotNumericException;
3233
use 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
*/

0 commit comments

Comments
 (0)