mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 06:16:05 +03:00
Add phpstan PHP Static Analysis Tool
This commit is contained in:
parent
d5b4d446ce
commit
0d63d74cbb
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ composer.phar
|
||||
composer.lock
|
||||
vendor/
|
||||
bin/
|
||||
phpstan.phar
|
||||
|
@ -9,7 +9,13 @@ php:
|
||||
- 7.2
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- stage: Code Quality
|
||||
php: 7.2
|
||||
env: STATIC_ANALYSIS
|
||||
install: travis_retry composer install --prefer-dist
|
||||
script: composer static-analysis
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
|
@ -18,9 +18,6 @@
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin",
|
||||
"platform": {
|
||||
"php": "5.6.0"
|
||||
},
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
@ -36,6 +33,15 @@
|
||||
"GraphQL\\Examples\\Blog\\": "examples/01-blog/Blog/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"static-analysis": [
|
||||
"rm phpstan.phar || true",
|
||||
"@composer req --ansi --no-interaction --dev phpstan/phpstan-shim",
|
||||
"cp -f vendor/phpstan/phpstan-shim/phpstan.phar .",
|
||||
"@composer rem --ansi --dev phpstan/phpstan-shim",
|
||||
"@php phpstan.phar analyse --ansi -l 1 -c phpstan.neon src"
|
||||
]
|
||||
},
|
||||
"suggest": {
|
||||
"react/promise": "To leverage async resolving on React PHP platform",
|
||||
"psr/http-message": "To use standard GraphQL server"
|
||||
|
0
phpstan.neon
Normal file
0
phpstan.neon
Normal file
Loading…
Reference in New Issue
Block a user