Skip to content

Commit 90ffb60

Browse files
committed
composer: added PHPStan
1 parent 459bac9 commit 90ffb60

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
@@ -42,12 +42,8 @@ jobs:
4242

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

5248

5349
- stage: Code Coverage

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@
2020
},
2121
"require-dev": {
2222
"nette/tester": "^2.2",
23-
"tracy/tracy": "^2.3"
23+
"tracy/tracy": "^2.3",
24+
"phpstan/phpstan-nette": "^0.12"
2425
},
2526
"autoload": {
2627
"classmap": ["src/"]
2728
},
2829
"minimum-stability": "dev",
30+
"scripts": {
31+
"phpstan": "phpstan analyse --level 5 --configuration tests/phpstan.neon src",
32+
"tester": "tester tests -s"
33+
},
2934
"extra": {
3035
"branch-alias": {
3136
"dev-master": "1.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)