Skip to content

Commit

Permalink
Check code quality with PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
lcobucci committed Aug 12, 2018
1 parent 94a155b commit 55930fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/composer.lock
/.phpcs.cache
/infection-log.txt
/phpstan.neon
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ jobs:
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/infection -s --threads=4 --min-msi=100 --min-covered-msi=100

- stage: Metrics and quality
env: STATIC_ANALYSIS
script:
- ./vendor/bin/phpstan analyse
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"require-dev": {
"infection/infection": "^0.10",
"lcobucci/coding-standard": "^1.0",
"phpstan/phpstan": "^0.10",
"phpstan/phpstan-deprecation-rules": "^0.10",
"phpstan/phpstan-phpunit": "^0.10",
"phpstan/phpstan-strict-rules": "^0.10",
"phpunit/phpunit": "^7.3"
},
"autoload": {
Expand Down
11 changes: 11 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
level: 7
paths:
- src
- test

0 comments on commit 55930fe

Please sign in to comment.