-
Notifications
You must be signed in to change notification settings - Fork 272
/
phpstan.neon
59 lines (59 loc) · 2.59 KB
/
phpstan.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
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: max
phpVersion: 80000
inferPrivatePropertyTypeFromConstructor: true
paths:
- %currentWorkingDirectory%/src/
- %currentWorkingDirectory%/views/
- %currentWorkingDirectory%/wp2static.php
scanFiles:
- %currentWorkingDirectory%/tests/phpstan/bootstrap.php
# TODO Use https://github.com/php-stubs/wp-cli-stubs
- %currentWorkingDirectory%/tests/phpstan/wp-cli-stubs-2.2.0.php
ignoreErrors:
# TODO I should really develop a tiny Request Handler.
# https://gist.github.com/nicolas-grekas/1028251#improving-native-php-interface
- message: '#^In method "WP2Static\\\S+::\S+", you should not use the \$_(COOKIE|GET|POST) superglobal#'
path: src/Controller.php
count: 1
- message: '#^In method "WP2Static\\\S+::\S+", you should not use the \$_(GET|POST) superglobal#'
path: src/CoreOptions.php
count: 16
- message: '#^In method "WP2Static\\\S+::\S+", you should not use the \$_(GET|POST) superglobal#'
path: src/ViewRenderer.php
count: 10
- message: "#^Cannot access property \\$value on mixed\\.$#"
path: views/options-page.php
count: 4
- message: "#^Cannot access property \\$name on mixed\\.$#"
path: views/options-page.php
count: 2
- message: "#^Cannot access property \\$time on string\\.$#"
path: views/logs-page.php
count: 1
- message: "#^Cannot access property \\$log on string\\.$#"
path: views/logs-page.php
count: 1
- message: "#^Cannot access property \\$\\S+ on mixed\\.$#"
path: views/jobs-page.php
count: 12
- message: "#^Cannot access property \\$\\S+ on mixed\\.$#"
path: views/addons-page.php
count: 7
- message: "#^Cannot access offset \\S+ on mixed\\.$#"
path: src/SitemapParser.php
count: 3
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/Controller.php
count: 6
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/CLI.php
count: 9
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/Addons.php
count: 1
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'