Skip to content

Commit 74e2a5a

Browse files
committed
composer: added PHPStan
1 parent 1eaffc6 commit 74e2a5a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
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

4444
- stage: Static Analysis (informative)
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@
1717
"require": {
1818
"php": ">=7.1"
1919
},
20+
"require-dev": {
21+
"phpstan/phpstan": "^0.12"
22+
},
2023
"autoload": {
2124
"classmap": ["src/"]
2225
},
2326
"bin": ["src/tester"],
27+
"scripts": {
28+
"phpstan": "phpstan analyse --level 5 src",
29+
"tester": "tester tests -s"
30+
},
2431
"extra": {
2532
"branch-alias": { "dev-master": "2.4-dev" }
2633
}

0 commit comments

Comments
 (0)