-
Notifications
You must be signed in to change notification settings - Fork 30
/
phpstan.neon.dist
40 lines (34 loc) · 1.67 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
includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
# Bleeding edge offers a preview of the next major version.
# When you enable Bleeding edge in your configuration file, you will get new rules,
# behaviour, and bug fixes that will be enabled for everyone later
# when the next PHPStan’s major version is released.
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
bootstrapFiles:
# Constants, functions, etc. used by GatherPress
- phpstan.stubs
parallel:
maximumNumberOfProcesses: 1
processTimeout: 300.0
# the analysis level, from 0 (loose) to 9 (strict)
# https://phpstan.org/user-guide/rule-levels
level: 5
paths:
- includes/
ignoreErrors:
# includes/core/classes/class-setup.php
#
# A dev-only errors, which can occur if the gatherpress is symlinked into a WP instance or called via wp-env or Playground.
- '#^Path in require_once\(\) "\./wp-admin/includes/upgrade\.php" is not a file or it does not exist\.$#'
# includes/core/classes/endpoints/class-endpoint.php
#
# A known issue, but not a problem.
# This "callable-string" is only used in a debug message and is not run.
-
# I was not able to get the escaping work for the "'", so this matches all argument.type errors in this file,
# which is not nice, but the workaround.
# message: '#Parameter #1 \$function_name of function wp_trigger_error expects callable-string, \'GatherPress\\Core\\Endpoints\\Endpoint\' given.#'
identifier: argument.type
path: includes/core/classes/endpoints/class-endpoint.php