File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 8
8
/.gitattributes export-ignore
9
9
/.gitignore export-ignore
10
10
/.phpcs.xml.dist export-ignore
11
+ /phpstan.neon.dist export-ignore
11
12
/phpunit.xml.dist export-ignore
12
13
/.github export-ignore
13
14
/bin export-ignore
Original file line number Diff line number Diff line change 76
76
# At a later stage the documentation check can be activated.
77
77
- name : Check sniff feature completeness
78
78
run : composer feature-completeness
79
+
80
+ phpstan :
81
+ name : " PHPStan"
82
+
83
+ runs-on : " ubuntu-latest"
84
+
85
+ steps :
86
+ - name : Checkout code
87
+ uses : actions/checkout@v3
88
+
89
+ - name : Install PHP
90
+ uses : shivammathur/setup-php@v2
91
+ with :
92
+ php-version : ' 7.4'
93
+ coverage : none
94
+ tools : phpstan
95
+
96
+ # Install dependencies and handle caching in one go.
97
+ # Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized.
98
+ # @link https://github.com/marketplace/actions/install-composer-dependencies
99
+ - name : Install Composer dependencies
100
+ uses : " ramsey/composer-install@v2"
101
+ with :
102
+ # Bust the cache at least once a month - output format: YYYY-MM.
103
+ custom-cache-suffix : $(date -u "+%Y-%m")
104
+
105
+ - name : Run PHPStan
106
+ run : phpstan analyse
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ phpcs.xml
5
5
.phpcs.xml
6
6
phpunit.xml
7
7
phpcs.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: 5
4
+ paths:
5
+ - WordPressVIPMinimum
6
+ - tests
7
+ bootstrapFiles:
8
+ - tests/bootstrap.php
9
+ scanDirectories:
10
+ - vendor/wp-coding-standards/wpcs/WordPress
11
+ treatPhpDocTypesAsCertain: false
12
+
13
+ ignoreErrors:
You can’t perform that action at this time.
0 commit comments