-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathphpstan.neon
40 lines (40 loc) · 2.03 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
parameters:
level: 8
paths:
- src
- bh-wp-autologin-urls.php
excludePaths:
- vendor-prefixed
bootstrapFiles:
- phpstanbootstrap.php
- autoload.php
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- vendor/wp-cli/wp-cli/php/class-wp-cli-command.php
- vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
# - vendor/php-stubs/woocommerce-stubs/woocommerce-packages-stubs.php
scanFiles:
- vendor/antecedent/patchwork/Patchwork.php
scanDirectories:
- vendor-prefixed
- wp-content/plugins/newsletter
- wp-content/plugins/mailpoet
- wp-content/plugins/woocommerce
- vendor/wp-cli
ignoreErrors:
# LoggerAwareTrait allows for null $logger, but we set it in the constructor.
- '#LoggerInterface\|null#'
# PHPStan show errors when filters have more than two parameters.
- '#^Function apply_filters(_ref_array)? invoked with \d parameters, 2 required\.$#'
# Parameter #1 $message of method a expects b, c given.
- '/Parameter .* of .* expects .* given\./'
# Function add_autologin_to_url() has parameter $user with no typehint specified.
# The function accepts int|string|WP_User as the type.
- '/Function add_autologin_to_url\(\) has parameter \$user with no typehint specified\./'
# Setting an empty array with type associative array in the comments prints this.
- '/does not accept default value of type array\(\)/'
# The Klaviyo SDK isn't strongly typed
- '/Access to an undefined property BrianHenryIE\\WP_Autologin_URLs\\Klaviyo\\Client::\$Profiles\./'
# The public root-namespaced function add_autologin_to_url() can accept int|string|WP_User.
- '/Function add_autologin_to_url\(\) has parameter \$user with no type specified\./'
# When setting array's default value to an empty array but still type annotating, this message appears:
- '/.*does not accept default value of type array{}./'