-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpstan.neon.dist
72 lines (69 loc) · 2.23 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
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
services:
-
class: PHPStan\WordPress\IsWpErrorFunctionTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
-
class: PHPStan\WordPress\GetPostDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: PHPStan\WordPress\GetPostsDynamicFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: PHPStan\WordPress\ServiceContainerDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
class: PHPStan\WordPress\ServicesDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
parameters:
level: 8
inferPrivatePropertyTypeFromConstructor: true
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
paths:
- includes/
excludes_analyse:
- includes/vendor/*
- includes/polyfills/*
scanDirectories:
- third-party/
scanFiles:
- tests/phpstan/stubs/amp.php
- tests/phpstan/stubs/wordpress-seo.php
- tests/phpstan/stubs/wp-cli.php
- tests/phpstan/stubs/wpdotcom.php
bootstrapFiles:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- tests/phpstan/stubs/wordpress-defines.php
- tests/phpstan/bootstrap.php
- third-party/vendor/ampproject/amp-wp/includes/sanitizers/class-amp-base-sanitizer.php
- third-party/vendor/ampproject/amp-wp/includes/sanitizers/class-amp-meta-sanitizer.php
dynamicConstantNames:
- WP_DEBUG
- WP_DEBUG_LOG
- EMPTY_TRASH_DAYS
- WP_CLI
- WEBSTORIES_DEV_MODE
- WPCOM_IS_VIP_ENV
- IS_WPCOM
- GOOGLESITEKIT_VERSION
- AMP__VERSION
earlyTerminatingFunctionCalls:
- wp_die
- wp_send_json
- wp_send_json_success
- wp_send_json_error
- wp_nonce_ays
- dead_db
ignoreErrors:
# Uses func_get_args()
- '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
# False positive for wp_unslash()
- '#^Cannot cast array\|string to string.$#'
# wp_die() is called with [ 'exit' => false ]
- message: '#^Unreachable statement - code above always terminates.$#'
path: includes/Renderer/Story/HTML.php