| 1 |
# PHPStan configuration for Dev Containers |
| 2 |
|
| 3 |
# Include PHPStan for WordPress configuration. |
| 4 |
includes: |
| 5 |
- vendor/szepeviktor/phpstan-wordpress/extension.neon |
| 6 |
|
| 7 |
# Parameters |
| 8 |
parameters: |
| 9 |
# Paths to scan |
| 10 |
# This should comprise of the base Plugin PHP file, plus directories that contain Plugin PHP files |
| 11 |
paths: |
| 12 |
- wp-convertkit.php |
| 13 |
- admin/ |
| 14 |
- includes/ |
| 15 |
|
| 16 |
# Files that include Plugin-specific PHP constants. |
| 17 |
bootstrapFiles: |
| 18 |
- wp-convertkit.php |
| 19 |
|
| 20 |
# Location of WordPress Plugins for PHPStan to scan, building symbols. |
| 21 |
scanDirectories: |
| 22 |
- /wp/wp-content/plugins |
| 23 |
|
| 24 |
# Location of constants, Kit helper functions and Kit WordPress Libraries for PHPStan to scan, building symbols. |
| 25 |
scanFiles: |
| 26 |
- /wp/wp-config.php |
| 27 |
|
| 28 |
# Don't report unmatched ignored errors on older PHP versions (7.2, 7.3) |
| 29 |
reportUnmatchedIgnoredErrors: false |
| 30 |
|
| 31 |
# Ignore the following errors, as PHPStan and PHPStan for WordPress haven't correctly registered symbols, |
| 32 |
# so they're false positives. |
| 33 |
ignoreErrors: |
| 34 |
- '#Function __ invoked with 2 parameters, 1 required.#' |
| 35 |
|
| 36 |
# Should not need to edit anything below here |
| 37 |
# Rule Level: https://phpstan.org/user-guide/rule-levels |
| 38 |
level: 5 |