Skip to content

Commit 4b4cd6b

Browse files
committed
composer: added PHPStan
1 parent 7d23151 commit 4b4cd6b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.travis.yml

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

3838
- stage: Static Analysis (informative)
3939
php: 7.4
40-
install:
41-
# Install PHPStan
42-
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
43-
- travis_retry composer install --no-progress --prefer-dist
4440
script:
45-
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 --configuration tests/phpstan.neon src
41+
- composer run-script phpstan
4642

4743

4844
- stage: Code Coverage

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
},
2020
"require-dev": {
2121
"nette/tester": "~2.0",
22-
"tracy/tracy": "^2.3"
22+
"tracy/tracy": "^2.3",
23+
"phpstan/phpstan": "^0.12"
2324
},
2425
"suggest": {
2526
"ext-iconv": "to use Strings::webalize() and toAscii()",
@@ -34,6 +35,10 @@
3435
"classmap": ["src/"]
3536
},
3637
"minimum-stability": "dev",
38+
"scripts": {
39+
"phpstan": "phpstan analyse --level 5 --configuration tests/phpstan.neon src",
40+
"tester": "tester tests -s"
41+
},
3742
"extra": {
3843
"branch-alias": {
3944
"dev-master": "3.0-dev"

tests/phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
bootstrap: tests/phpstan-bootstrap.php
2+
bootstrap: phpstan-bootstrap.php
33

44
ignoreErrors:
55
# PHPStan does not support dynamic by reference return used by Nette\Utils\Strings::pcre()

0 commit comments

Comments
 (0)