Skip to content

Commit 7461c4a

Browse files
committed
composer: added PHPStan
1 parent fd6a384 commit 7461c4a

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
@@ -41,12 +41,8 @@ jobs:
4141

4242

4343
- stage: Static Analysis (informative)
44-
install:
45-
# Install PHPStan
46-
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
47-
- travis_retry composer install --no-progress --prefer-dist
4844
script:
49-
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 src
45+
- composer run-script phpstan
5046

5147

5248
- stage: Code Coverage

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"nette/di": "^3.0.0",
2323
"nette/http": "^3.0.0",
2424
"nette/tester": "^2.0",
25-
"tracy/tracy": "^2.4"
25+
"tracy/tracy": "^2.4",
26+
"phpstan/phpstan-nette": "^0.12"
2627
},
2728
"conflict": {
2829
"nette/di": "<3.0-stable"
@@ -31,6 +32,10 @@
3132
"classmap": ["src/"]
3233
},
3334
"minimum-stability": "dev",
35+
"scripts": {
36+
"phpstan": "phpstan analyse --level 5 --configuration tests/phpstan.neon src",
37+
"tester": "tester tests -s"
38+
},
3439
"extra": {
3540
"branch-alias": {
3641
"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)