forked from johnbillion/query-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon.dist
43 lines (43 loc) · 1.31 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
39
40
41
42
43
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: 7
tmpDir: tests/cache
paths:
- query-monitor.php
- classes
- collectors
- dispatchers
- output
- tests/acceptance
- tests/integration
- wp-content
scanDirectories:
- tests/_support
excludePaths:
analyse:
- tests/integration/Supports
bootstrapFiles:
- vendor/johnbillion/plugin-infrastructure/phpstan-stubs.php
- tests/phpstan/stubs.php
dynamicConstantNames:
- COOKIE_DOMAIN
- SAVEQUERIES
ignoreErrors:
# Uses func_get_args()
- '#^Function apply_filters invoked with [34567] parameters, 2 required\.$#'
# 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 [^:]+::data[a-zA-Z]+\(\) is unused\.$#'
# Passing ints and floats to these functions is fine
- '#Parameter \#1 \$text of function esc_(html|attr) expects string, int\|string given#'
- '#Parameter \#1 \$text of function esc_(html|attr) expects string, float\|int\|string given#'
reportUnmatchedIgnoredErrors: false
universalObjectCratesClasses:
- QM_Data_Fallback