Skip to content

Commit 43feaef

Browse files
committed
composer: added PHPStan
1 parent 0f3b66a commit 43feaef

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,8 @@ jobs:
4646

4747

4848
- stage: Static Analysis (informative)
49-
install:
50-
# Install PHPStan
51-
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
52-
- travis_retry composer install --no-progress --prefer-dist
5349
script:
54-
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 src
50+
- composer run-script phpstan
5551

5652

5753
- stage: Code Coverage

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"nette/security": "^3.0",
3434
"latte/latte": "^2.5.1",
3535
"tracy/tracy": "^2.6",
36-
"mockery/mockery": "^1.0"
36+
"mockery/mockery": "^1.0",
37+
"phpstan/phpstan-nette": "^0.12"
3738
},
3839
"conflict": {
3940
"nette/di": "<3.0-stable",
@@ -46,6 +47,10 @@
4647
"files": ["src/compatibility.php"]
4748
},
4849
"minimum-stability": "dev",
50+
"scripts": {
51+
"phpstan": "phpstan analyse --level 5 --configuration tests/phpstan.neon src",
52+
"tester": "tester tests -s"
53+
},
4954
"extra": {
5055
"branch-alias": {
5156
"dev-master": "3.0-dev"

tests/phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
includes:
2+
- ../vendor/phpstan/phpstan-nette/extension.neon

0 commit comments

Comments
 (0)