forked from rhubarbgroup/redis-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.dist.neon
80 lines (63 loc) · 2.63 KB
/
phpstan.dist.neon
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Running PHPStan needs ext-relay.
includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: 5
treatPhpDocTypesAsCertain: false
inferPrivatePropertyTypeFromConstructor: true
phpVersion: 70200
dynamicConstantNames:
- WP_DEBUG_DISPLAY
- WP_REDIS_SERVERS
- WP_REDIS_PASSWORD
bootstrapFiles:
- tests/PHPStan/bootstrap.php
# Made with generate-stubs --classes --interfaces --traits --out=query-monitor-stubs.php classes/ output/
- tests/PHPStan/query-monitor-stubs.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
paths:
- includes/
- tests/PHPStan/object-cache.php
excludePaths:
- includes/object-cache.php
ignoreErrors:
# https://github.com/phpredis/phpredis/blob/b193a6d051969a4d5bec33c958e9033f0d983110/redis_cluster.stub.php#L50
-
message: "#^Class RedisCluster constructor invoked with 1 parameter, 2\\-6 required\\.$#"
count: 1
path: tests/PHPStan/object-cache.php
# PHPStan shortcoming
-
message: "#^Parameter \\#1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\)\\: void, array\\{\\$this\\(Rhubarb\\\\RedisCache\\\\Autoloader\\), 'load_class'\\} given\\.$#"
count: 1
path: includes/class-autoloader.php
# Redis Cache implementation differs from core
-
message: "#^Class WP_Object_Cache constructor invoked with 1 parameter, 0 required\\.$#"
count: 1
path: includes/diagnostics.php
# Included template calling protected method
-
message: "#^Call to protected method after_non_tabular_output\\(\\) of class QM_Output_Html\\.$#"
count: 1
path: includes/ui/query-monitor.php
# Included template calling protected method
-
message: "#^Call to protected method before_non_tabular_output\\(\\) of class QM_Output_Html\\.$#"
count: 1
path: includes/ui/query-monitor.php
# Included template using private property
-
message: "#^Access to private property Rhubarb\\\\RedisCache\\\\Plugin\\:\\:\\$page\\.$#"
count: 1
path: includes/ui/widget.php
# False positive
-
message: "#^Variable \\$this might not be defined#"
count: 1
path: includes/ui/settings.php
# False positive
-
message: "#^Access to undefined constant Credis_Client::VERSION#"
count: 1
path: tests/PHPStan/object-cache.php