| 1 |
# PHPStan configuration for local static analysis. |
| 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 installation |
| 21 |
scanDirectories: |
| 22 |
- /Users/tim/Local Sites/convertkit-github/app/public |
| 23 |
|
| 24 |
# Should not need to edit anything below here |
| 25 |
# Rule Level: https://phpstan.org/user-guide/rule-levels |
| 26 |
level: 5 |
| 27 |
|
| 28 |
# Ignore the following errors, as PHPStan and PHPStan for WordPress haven't registered symbols for them yet, |
| 29 |
# so they're false positives. |
| 30 |
ignoreErrors: |
| 31 |
- '#Access to an undefined property WP_Theme::#' |
| 32 |
- '#Constant WP_MEMORY_LIMIT not found.#' |
| 33 |
- '#Constant DB_HOST not found.#' |
| 34 |
- '#Constant WPINC not found.#' |
| 35 |
- '#Function apply_filters invoked with#' # apply_filters() accepted a variable number of parameters, which PHPStan fails to detect |