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
|
composer.lock
|
||||||
vendor/
|
vendor/
|
||||||
bin/
|
bin/
|
||||||
|
phpstan.phar
|
||||||
|
@ -9,7 +9,13 @@ php:
|
|||||||
- 7.2
|
- 7.2
|
||||||
- nightly
|
- 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:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
|
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin",
|
"bin-dir": "bin",
|
||||||
"platform": {
|
|
||||||
"php": "5.6.0"
|
|
||||||
},
|
|
||||||
"preferred-install": "dist",
|
"preferred-install": "dist",
|
||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
},
|
},
|
||||||
@ -36,6 +33,15 @@
|
|||||||
"GraphQL\\Examples\\Blog\\": "examples/01-blog/Blog/"
|
"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": {
|
"suggest": {
|
||||||
"react/promise": "To leverage async resolving on React PHP platform",
|
"react/promise": "To leverage async resolving on React PHP platform",
|
||||||
"psr/http-message": "To use standard GraphQL server"
|
"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