-
-
Notifications
You must be signed in to change notification settings - Fork 212
/
phpstan.neon.dist
38 lines (38 loc) · 1.22 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
28
29
30
31
32
33
34
35
36
37
38
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
- vendor/johnbillion/plugin-infrastructure/phpstan/extension.neon
- vendor/johnbillion/wp-compat/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
level: 7
paths:
- query-monitor.php
- classes/
- collectors/
- dispatchers/
- output/
- tests/acceptance/
- tests/integration/
- wp-content/
scanDirectories:
- tests/_support/
excludePaths:
analyse:
- tests/integration/Supports/
bootstrapFiles:
- tests/phpstan/stubs.php
universalObjectCratesClasses:
- QM_Data_Fallback
ignoreErrors:
# The `wpdb` class exposes its properties via `__get()`
- '#^Access to protected property wpdb::#'
# Properties in QM_Data* classes are nullable
- '#^Property QM_Data_.+ is not nullable\.$#'
# Data providers for acceptance tests
-
path: tests/acceptance/*
message: '#^Method \S+::data[a-zA-Z]+\(\) is unused\.$#'
# Passing ints and floats to these functions is fine
- '#^Parameter \#1 \$text of function (esc_html|esc_attr) expects string, int\|string given#'
- '#^Parameter \#1 \$text of function (esc_html|esc_attr) expects string, float\|int\|string given#'