Skip to content

Commit

Permalink
Merge 3a150ea into 43760fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekman committed Oct 23, 2018
2 parents 43760fa + 3a150ea commit 22343da
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Expand Up @@ -4,11 +4,15 @@ php:
- 7.0
- 7.1
- 7.2
- hhvm
- 7.3

install: composer install --no-interaction --classmap-authoritative
install:
- composer install --no-interaction --classmap-authoritative
- composer require --no-interaction php-coveralls/php-coveralls:^2.0

script: vendor/bin/phpunit --configuration phpunit.xml
script:
- chmod +x run-phpunit.sh
- ./run-phpunit.sh

after_success: vendor/bin/php-coveralls --verbose

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master)](https://travis-ci.org/Ekman/Luhn-Algorithm)
[![Coverage Status](https://coveralls.io/repos/github/Ekman/Luhn-Algorithm/badge.svg)](https://coveralls.io/github/Ekman/Luhn-Algorithm)

This is an implementation of the Luhn Algorithm for PHP and HHVM. The Luhn Algorithm is
This is an implementation of the Luhn Algorithm for PHP. 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).

Expand Down
5 changes: 0 additions & 5 deletions composer.json
Expand Up @@ -35,10 +35,5 @@
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0",
"friendsofphp/php-cs-fixer": "^2.0",
"php-coveralls/php-coveralls": "^2.0"
}
}
12 changes: 12 additions & 0 deletions run-php-cs-fixer.sh
@@ -0,0 +1,12 @@
#!/bin/bash

#
# Runs code standard fixer without having the need to specify it as a
# Composer dependency.
#

composer require --no-interaction friendsofphp/php-cs-fixer:^2.0

vendor/bin/php-cs-fixer --config=.php_cs.dist --no-interaction fix

composer remove --no-interaction friendsofphp/php-cs-fixer
17 changes: 17 additions & 0 deletions run-phpunit.sh
@@ -0,0 +1,17 @@
#!/bin/bash

#
# Runs code standard fixer without having the need to specify it as a
# Composer dependency.
#

if [ $TRAVIS ]; then
# No need to install PHPunit
phpunit --configuration phpunit.xml
else
composer require --no-interaction phpunit/phpunit:^6.0

vendor/bin/phpunit --configuration phpunit.xml

composer remove --no-interaction phpunit/phpunit
fi;

0 comments on commit 22343da

Please sign in to comment.