File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 99/.gitignore export-ignore
1010/.github export-ignore
1111/phpcs.xml.dist export-ignore
12+ /phpstan.neon.dist export-ignore
1213/phpunit.xml.dist export-ignore
1314/phpunit-bootstrap.php export-ignore
1415/PHPCSDebug /Tests export-ignore
Original file line number Diff line number Diff line change 9797 - name : Show PHPCS results in PR
9898 if : ${{ always() && steps.phpcs.outcome == 'failure' }}
9999 run : cs2pr ./phpcs-report.xml
100+
101+ phpstan :
102+ name : " PHPStan"
103+ runs-on : " ubuntu-latest"
104+
105+ steps :
106+ - name : Checkout code
107+ uses : actions/checkout@v4
108+
109+ - name : Install PHP
110+ uses : shivammathur/setup-php@v2
111+ with :
112+ php-version : ' latest'
113+ coverage : none
114+ tools : phpstan
115+
116+ # Install dependencies and handle caching in one go.
117+ # Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized.
118+ # @link https://github.com/marketplace/actions/install-composer-dependencies
119+ - name : Install Composer dependencies
120+ uses : " ramsey/composer-install@v3"
121+ with :
122+ # Bust the cache at least once a month - output format: YYYY-MM.
123+ custom-cache-suffix : $(date -u "+%Y-%m")
124+
125+ - name : Run PHPStan
126+ run : phpstan analyse
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ composer.lock
55phpcs.xml
66phpunit.xml
77.phpunit.result.cache
8+ phpstan.neon
Original file line number Diff line number Diff line change 1+ parameters:
2+ #phpVersion: 50400 # Needs to be 70100 or higher... sigh...
3+ level: 6
4+ paths:
5+ - bin
6+ - PHPCSDebug
7+ - Scripts
8+ - Tests
9+ bootstrapFiles:
10+ - phpunit-bootstrap.php
11+ treatPhpDocTypesAsCertain: false
You can’t perform that action at this time.
0 commit comments