Skip to content

Commit 8cce59c

Browse files
committed
composer: added PHPStan
1 parent dc7e610 commit 8cce59c

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
@@ -54,12 +54,8 @@ jobs:
5454

5555

5656
- stage: Static Analysis (informative)
57-
install:
58-
# Install PHPStan
59-
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
60-
- travis_retry composer install --no-progress --prefer-dist
6157
script:
62-
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 src
58+
- composer run-script phpstan
6359

6460

6561
- 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/di": "^3.0",
2525
"nette/tester": "^2.0",
2626
"latte/latte": "^2.4.1",
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)