forked from wp-media/wp-rocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon.dist
43 lines (43 loc) · 2.09 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
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
# level: max
level: 4
checkMissingIterableValueType: false
inferPrivatePropertyTypeFromConstructor: true
paths:
# Test all PHP code.
# - %currentWorkingDirectory%/inc/
- %currentWorkingDirectory%/inc/classes/
autoload_files:
- %currentWorkingDirectory%/tests/phpstan/bootstrap.php
# Must be first
- %currentWorkingDirectory%/inc/functions/options.php
# Procedural code
- %currentWorkingDirectory%/inc/3rd-party/plugins/autoptimize.php
- %currentWorkingDirectory%/inc/admin/ui/notices.php
- %currentWorkingDirectory%/inc/functions/admin.php
- %currentWorkingDirectory%/inc/functions/api.php
- %currentWorkingDirectory%/inc/functions/cloudflare.php
- %currentWorkingDirectory%/inc/functions/files.php
- %currentWorkingDirectory%/inc/functions/formatting.php
- %currentWorkingDirectory%/inc/functions/htaccess.php
- %currentWorkingDirectory%/inc/functions/i18n.php
- %currentWorkingDirectory%/inc/functions/posts.php
- %currentWorkingDirectory%/inc/functions/preload.php
- %currentWorkingDirectory%/inc/functions/varnish.php
# Composer autoloader "exclude-from-classmap"
- %currentWorkingDirectory%/inc/classes/class-wp-rocket-requirements-check.php
- %currentWorkingDirectory%/inc/vendors/classes/class-rocket-mobile-detect.php
excludes_analyse:
- %currentWorkingDirectory%/inc/vendors/
# These need plugin stubs!
- %currentWorkingDirectory%/inc/classes/subscriber/third-party/
ignoreErrors:
# Uses func_get_args()
- '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
# https://core.trac.wordpress.org/ticket/43304
#- '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/'
# TODO #1 Define properties.
- '#^Access to an undefined property WP_Rocket\\\S+\.$#'