forked from GravityKit/GravityExport-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
49 lines (48 loc) · 2.35 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
41
42
43
44
45
46
47
48
49
#$ composer update --optimize-autoloader
#$ vendor/bin/phpstan analyze
includes:
# @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
# Include this extension
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: 5
bootstrapFiles:
- gfexcel.php
- tests/phpstan/bootstrap.php
inferPrivatePropertyTypeFromConstructor: true
# autoload_files:
# # Missing constants, function and class stubs
# - %currentWorkingDirectory%/tests/phpstan/bootstrap.php
# # Plugin stubs
# - %currentWorkingDirectory%/tests/phpstan/PLUGIN-stubs.php
# # Procedural code
# - %currentWorkingDirectory%/myplugin-functions.php
# autoload_directories:
# - %currentWorkingDirectory%/inc/
paths:
- src
- tests
# excludes_analyse:
# - %currentWorkingDirectory%/inc/views/
ignoreErrors:
- '/Function gform_tooltip not found\./'
- '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'
- '/^Function gf_apply_filters invoked with \d+ parameters, 2 required.$/'
- '/^Function gf_do_action invoked with \d+ parameters, 1 required.$/'
- '/Parameter #3 \$default of function rgar expects string\|null/'
# Unit tests edge cases
- '/^Result of method .*?::.*?\(\) \(void\) is used.$/'
- '/MockObject|stdClass>? given.$/'
# Fixed in WordPress 5.3
#- '#^Function do_action(_ref_array)? invoked with [3456] parameters, 1-2 required\.$#'
#- '#^Function current_user_can invoked with 2 parameters, 1 required\.$#'
#- '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#'
#- '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#'
#- '#^Function add_post_type_support invoked with [345] parameters, 2 required\.$#'
#- '#^Function ((get|add)_theme_support|current_theme_supports) invoked with [2345] parameters, 1 required\.$#'
# https://core.trac.wordpress.org/ticket/43304
# - '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/'
# WP-CLI accepts a class as callable
# - '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'
# Please consider commenting ignores: issue URL or reason for ignoring