forked from polylang/polylang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
52 lines (46 loc) · 1.79 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
44
45
46
47
48
49
50
51
52
includes:
- vendor/wpsyntex/polylang-phpstan/extension.neon
- phpstan-baseline.neon
parameters:
level: max
paths:
- polylang.php
- admin/
- frontend/
- include/
- install/
- modules/
- settings/
excludePaths:
- **/load.php
- include/widget-calendar.php
- install/plugin-updater.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
- identifier: missingType.iterableValue
- '#^Parameter \#1 \$message of function wp_die expects string|WP_Error, int given\.$#'
# Temporarily ignored
-
message: "#^Left side of \\|\\| is always false\\.$#"
count: 1
path: admin/admin-base.php
# Ignored because the WordPress stubs doesn't know a dynamic key in the associative array passed to the get_terms() parameter
- "#^Parameter \\#1 \\$args of function get_terms expects array(.+), non\\-empty\\-array\\<string, int\\|string\\> given\\.$#"
# Ignored PLL_Canonical::check_canonical_url() is used both as action callback and classic method.
-
message: "#^Action callback returns string\\|void but should not return anything\\.$#"
count: 1
path: frontend/frontend.php
# Ignored temporarily to prevent changing the type of the options everywhere in the plugin.
-
message: "#^Cannot call method merge\\(\\) on array\\.$#"
count: 1
path: settings/settings-module.php
# Ignored temporarily to prevent changing the type of the options everywhere in the plugin.
-
message: "#^Property .+\\:\\:\\$options \\(array\\) does not accept WP_Syntex\\\\Polylang\\\\Options\\\\Options\\.$#"
# Ignored because PHPStan is confused about the objects and method names (classes with same method names).
-
message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\): mixed, array\\{.+\\} given\\.$#"
count: 1
path: include/model.php