File tree Expand file tree Collapse file tree 6 files changed +35
-1
lines changed
Expand file tree Collapse file tree 6 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1515/package.json
1616/package-lock.json
1717/phpcs.xml
18+ /phpstan.neon
1819/phpunit.xml
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ composer.lock export-ignore
1111CONTRIBUTING.md export-ignore
1212package.json export-ignore
1313phpcs.xml export-ignore
14+ phpstan.neon export-ignore
1415phpunit.xml export-ignore
Original file line number Diff line number Diff line change 5353 run : composer install --no-interaction
5454 - name : Code style checks for PHP
5555 run : composer test-cs
56+
57+ phpstan :
58+ runs-on : ubuntu-latest
59+ steps :
60+ - name : Checkout
61+ uses : actions/checkout@v5
62+ with :
63+ fetch-depth : 0
64+ - name : Setup PHP
65+ uses : shivammathur/setup-php@v2
66+ with :
67+ php-version : 8.4
68+ tools : composer
69+ - name : Install PHP dependencies
70+ run : composer install --no-interaction --prefer-dist --no-scripts
71+ - name : PHPStan
72+ run : composer phpstan
Original file line number Diff line number Diff line change 2626 "phpunit/phpunit" : " ^8|^9" ,
2727 "slowprog/composer-copy-file" : " ~0.3" ,
2828 "squizlabs/php_codesniffer" : " ^3.13" ,
29+ "szepeviktor/phpstan-wordpress" : " ^v2.0" ,
30+ "phpstan/extension-installer" : " ^1.4" ,
31+ "phpstan/phpstan" : " ^2.1" ,
2932 "phpcompatibility/phpcompatibility-wp" : " ^2.1" ,
3033 "wp-coding-standards/wpcs" : " ^3.2"
3134 },
4245 ],
4346 "fix-cs" : [
4447 " phpcbf --standard=phpcs.xml"
48+ ],
49+ "phpstan" : [
50+ " phpstan analyse --memory-limit=1G"
4551 ]
4652 },
4753 "config" : {
4854 "allow-plugins" : {
4955 "composer/installers" : true ,
50- "dealerdirect/phpcodesniffer-composer-installer" : true
56+ "dealerdirect/phpcodesniffer-composer-installer" : true ,
57+ "phpstan/extension-installer" : true
5158 }
5259 }
5360}
Original file line number Diff line number Diff line change 1+ parameters :
2+ level : 3
3+ paths :
4+ - inc/
5+ - statify-blacklist.php
6+ ignoreErrors :
7+ - message : ' /^Constant STATIFYBLACKLIST_BASE not found\.$/'
8+ path : inc/
You can’t perform that action at this time.
0 commit comments