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 19
19
php-version : ${{ matrix.php-version }}
20
20
coverage : none
21
21
22
+ - name : Remove PHPStan as a dependency
23
+ run : composer remove --dev phpstan/phpstan
24
+
22
25
- name : Install Composer dependencies
23
26
uses : ramsey/composer-install@v2
24
27
Original file line number Diff line number Diff line change 1
1
* .DS_Store
2
2
.phpunit.result.cache
3
3
.vscode
4
+ phpcs.xml
5
+ phpstan.neon
6
+ phpunit.xml
4
7
tests /coverage
5
8
vendor
6
9
Original file line number Diff line number Diff line change 22
22
"require-dev" : {
23
23
"dealerdirect/phpcodesniffer-composer-installer" : " ^1.0" ,
24
24
"phpcompatibility/php-compatibility" : " ^9.3" ,
25
+ "phpstan/phpstan" : " ^1.10" ,
25
26
"squizlabs/php_codesniffer" : " ^3.7" ,
26
27
"symfony/phpunit-bridge" : " ^5.2 || ^6.2"
27
28
},
39
40
"coding-standards" : [
40
41
" phpcs"
41
42
],
43
+ "static-analysis" : [
44
+ " phpstan analyse"
45
+ ],
42
46
"test" : [
43
47
" simple-phpunit --testdox"
44
48
],
48
52
},
49
53
"scripts-descriptions" : {
50
54
"coding-standards" : " Check coding standards." ,
55
+ "static-analysis" : " Run static code analysis" ,
51
56
"test" : " Run all test suites." ,
52
57
"test-coverage" : " Generate code coverage reports in tests/coverage."
53
58
},
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