Skip to content

Commit 7136b1d

Browse files
committed
Add pre-commit config
1 parent 8d1b05d commit 7136b1d

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- repo: https://github.com/digitalpulp/pre-commit-php.git
2+
sha: 1.3.0
3+
hooks:
4+
- id: php-lint
5+
- id: php-unit
6+
- id: php-cbf
7+
files: \.(php)$
8+
args: [--standard=PSR2 --ignore=**/*.blade.php -p]
9+
- id: php-cs
10+
files: \.(php)$
11+
args: [--standard=PSR2 --ignore=**/*.blade.php -p]
12+
13+
- repo: git://github.com/pre-commit/pre-commit-hooks.git
14+
sha: v0.9.2
15+
hooks:
16+
- id: trailing-whitespace
17+
- id: detect-private-key
18+
- id: end-of-file-fixer
19+

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: php
2+
3+
php:
4+
- 7.0
5+
- 7.1
6+
7+
env:
8+
matrix:
9+
- COMPOSER_FLAGS="--prefer-lowest"
10+
- COMPOSER_FLAGS=""
11+
12+
before_script:
13+
- travis_retry composer self-update
14+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
15+
16+
script:
17+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
18+
19+
after_script:
20+
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
21+

0 commit comments

Comments
 (0)