Skip to content

Commit f67b12f

Browse files
committed
composer: added PHPStan
1 parent 8c81bf3 commit f67b12f

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
@@ -51,12 +51,8 @@ jobs:
5151

5252

5353
- stage: Static Analysis (informative)
54-
install:
55-
# Install PHPStan
56-
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
57-
- travis_retry composer install --no-progress --prefer-dist
5854
script:
59-
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 src
55+
- composer run-script phpstan
6056

6157

6258
- stage: Code Coverage

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"nette/tester": "^2.0",
2525
"nette/di": "^v3.0",
2626
"mockery/mockery": "^1.0.0",
27-
"tracy/tracy": "^2.4"
27+
"tracy/tracy": "^2.4",
28+
"phpstan/phpstan-nette": "^0.12"
2829
},
2930
"conflict": {
3031
"nette/di": "<3.0-stable"
@@ -33,6 +34,10 @@
3334
"classmap": ["src/"]
3435
},
3536
"minimum-stability": "dev",
37+
"scripts": {
38+
"phpstan": "phpstan analyse --level 5 --configuration tests/phpstan.neon src",
39+
"tester": "tester tests -s"
40+
},
3641
"extra": {
3742
"branch-alias": {
3843
"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)