-
Notifications
You must be signed in to change notification settings - Fork 52
/
phpstan.neon.dist
25 lines (25 loc) · 1.03 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
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#'
WPCompat:
requiresAtLeast: '6.1'