File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed
Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Static Code Analysis
2+
3+ on : [pull_request]
4+
5+ jobs :
6+ phpcs :
7+ name : PHPStan
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v4
12+
13+ - name : Setup PHP
14+ uses : shivammathur/setup-php@v2
15+ with :
16+ php-version : ' 8.2'
17+ coverage : none
18+
19+ - name : Install Composer dependencies
20+ uses : ramsey/composer-install@v2
21+
22+ - name : Run PHPStan
23+ run : composer static-analysis
Original file line number Diff line number Diff line change 1919 php-version : ${{ matrix.php-version }}
2020 coverage : none
2121
22+ - name : Remove PHPStan as a dependency
23+ run : composer remove --dev phpstan/phpstan
24+
2225 - name : Install Composer dependencies
2326 uses : ramsey/composer-install@v2
2427
Original file line number Diff line number Diff line change 11* .DS_Store
22.phpunit.result.cache
33.vscode
4+ phpcs.xml
5+ phpstan.neon
6+ phpunit.xml
47tests /coverage
58vendor
69
Original file line number Diff line number Diff line change 2222 "require-dev" : {
2323 "dealerdirect/phpcodesniffer-composer-installer" : " ^1.0" ,
2424 "phpcompatibility/php-compatibility" : " ^9.3" ,
25+ "phpstan/phpstan" : " ^1.10" ,
2526 "squizlabs/php_codesniffer" : " ^3.7" ,
2627 "symfony/phpunit-bridge" : " ^5.2 || ^6.2"
2728 },
3940 "coding-standards" : [
4041 " phpcs"
4142 ],
43+ "static-analysis" : [
44+ " phpstan analyse"
45+ ],
4246 "test" : [
4347 " simple-phpunit --testdox"
4448 ],
4852 },
4953 "scripts-descriptions" : {
5054 "coding-standards" : " Check coding standards." ,
55+ "static-analysis" : " Run static code analysis" ,
5156 "test" : " Run all test suites." ,
5257 "test-coverage" : " Generate code coverage reports in tests/coverage."
5358 },
Original file line number Diff line number Diff line change 1+ parameters:
2+ level: 6
3+ paths:
4+ - src
5+ - tests
6+ excludePaths:
7+ - tests/coverage
You can’t perform that action at this time.
0 commit comments