Skip to content

Commit 9144a77

Browse files
committed
Conditionally execute PHPStan
1 parent 91452da commit 9144a77

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ os:
1313
- linux
1414

1515
matrix:
16+
include:
17+
- php: 7.2
18+
env: STATIC_ANALYSIS=true
1619
fast_finish: true
1720
allow_failures:
1821
- env: VALIDATION=true
@@ -22,6 +25,7 @@ cache:
2225
- validation/frameworks
2326

2427
before_script:
28+
- if [[ $STATIC_ANALYSIS = true ]]; then composer require phpstan/phpstan --no-update; fi
2529
- composer install
2630
- set -e # Stop on first error.
2731
- phpenv config-rm xdebug.ini
@@ -30,7 +34,7 @@ before_script:
3034

3135
script:
3236
- composer validate
33-
- ./vendor/bin/phpstan analyse src --level=2
37+
- if [[ $STATIC_ANALYSIS = true ]]; then ./vendor/bin/phpstan analyse src --level=2; fi
3438
- |
3539
if [[ $VALIDATION = true ]]; then
3640
./vendor/bin/phpunit --testsuite validation

0 commit comments

Comments
 (0)