-
Notifications
You must be signed in to change notification settings - Fork 52
/
phpstan.neon.dist
27 lines (27 loc) · 1.19 KB
/
phpstan.neon.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
parameters:
level: 1
scanFiles:
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-i18n-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-tools-stubs.php
paths:
- includes/
- classifai.php
- config.php
ignoreErrors:
# The JSDoc standard we use on hooks is not compatible with PHPStan.
- '#One or more @param tags has an invalid name or invalid syntax#'
# - '#PHPDoc tag @(.+) has invalid value \({(.+)}(.*)\): Unexpected token "{"#'
# Could look to fix this in the future.
- '#@param tag must not be named \$this. Choose a descriptive alias, for example \$instance#'
# Ignore ElasticPress for now, as we'll need to stub this.
- '#ElasticPress#'
# These constants are defined but we'd need to stub them for PHPStan to know.
- '#Constant CLASSIFAI_.+ not found#'
- '#Constant WATSON_.+ not found#'
- '#Constant MERCURY_PARSER_API_KEY not found#'
# Flags these require statements even though they are fine.
- '#Path in require_once\(\) "\.\/wp-admin\/includes\/.+\.php" is not a file or it does not exist#'
WPCompat:
requiresAtLeast: '6.5'