-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
46 lines (46 loc) · 1.5 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
46 lines (46 loc) · 1.5 KB
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
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
- vendor/johnbillion/plugin-infrastructure/phpstan/extension.neon
- vendor/johnbillion/wp-compat/extension.neon
- vendor/swissspidy/phpstan-no-private/rules.neon
parameters:
level: 9
paths:
- user-switching.php
- tests/acceptance
- tests/integration
scanDirectories:
- vendor/wp-phpunit/wp-phpunit/includes/
bootstrapFiles:
- tests/phpstan/stubs.php
dynamicConstantNames:
- DB_HOST
- DB_NAME
- DB_PASSWORD
- DB_USER
- SAVEQUERIES
- WP_MEMORY_LIMIT
- WPINC
- AUTH_COOKIE
- COOKIEHASH
- COOKIEPATH
- LOGGED_IN_COOKIE
- SECURE_AUTH_COOKIE
- SITECOOKIEPATH
- USER_SWITCHING_COOKIE
- USER_SWITCHING_SECURE_COOKIE
- USER_SWITCHING_OLDUSER_COOKIE
ignoreErrors:
# Covers the breaks after exits in user_switching::action_init()
-
message: '#^Unreachable statement#'
path: user-switching.php
count: 3
# Covers the WooCommerce compatibility checks
- '#^Call to function property_exists\(\) with WooCommerce and ''session'' will always evaluate to true\.$#'
- '#^Call to function method_exists\(\) with WC_Session and ''forget_session'' will always evaluate to true\.$#'
# Casting mixed to int or string isn't that big of a problem
- '#^Parameter \#1 \$maybeint of function absint expects array\|bool\|float\|int\|resource\|string\|null, mixed given\.$#'
- '#^Cannot cast mixed to string\.$#'
- '#\(mixed\) of encapsed string cannot be cast to string\.$#'