-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
38 lines (37 loc) · 1.4 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
38 lines (37 loc) · 1.4 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
includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
# Persist the result cache in a known project-relative path so CI can cache
# it between runs for faster analysis.
tmpDir: .phpstan-cache
# The HookCallbackRule "action callback should not return anything" check is
# too strict for dual-purpose methods that are both called directly (return
# value used) and registered on a real action (return value harmlessly
# discarded). Genuine filter-vs-action bugs are caught during review. The
# rule's argument-count checks (arguments.count) remain active.
ignoreErrors:
-
identifier: return.void
message: '#^Action callback returns .+ but should not return anything\.$#'
level: 5
paths:
- php
- cloudinary.php
scanFiles:
- instance.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php
- vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
- tests/phpstan/stubs/wpml.php
- tests/phpstan/stubs/elementor.php
- tests/phpstan/stubs/wpcom-vip.php
- tests/phpstan/stubs/constants.php
excludePaths:
- build/*
- node_modules/*
- vendor/*
# Extends WPCOM_VIP_CLI_Command, only available on the WordPress VIP platform.
- php/class-cli-vip.php
# View templates are included into a class scope (so $this is bound at
# runtime), which PHPStan cannot model when analysing them standalone.
- php/templates/*