-
Notifications
You must be signed in to change notification settings - Fork 10
/
phpstan.neon
40 lines (37 loc) · 1.28 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
# Start command: composer update --classmap-authoritative && vendor/bin/phpstan analyze
includes:
- phpstan-baseline.neon # Baseline to ignore error temporary
# https://github.com/phpstan/phpstan/blob/master/conf/bleedingEdge.neon
# - vendor/phpstan/phpstan/conf/bleedingEdge.neon
# - phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
# - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
parameters:
level: 9
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: false
scanFiles:
bootstrapFiles:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- tests/php/stubs/lite-stubs.php
paths:
- admin
- assets
- classes
- fields
- includes
- languages
- modules
ignoreErrors:
- '#Call to an undefined method [a-zA-Z0-9\\_]+\:\:add_control\(\).$#'
- '#Call to an undefined method [^\s]+\.$#'
- '#Call to method [^\s]+ on an unknown class Elementor\\[^\s]+\.$#'
- '#Cannot access [^\s]+#'
- '#Parameter [^\s]+#'
- '#Function [^\s]+ not found.#'
- '#Access to an undefined property [^\s]+#'
- '#Static property [^\s]+#'
- '#Call to static method [^\s]+#'
- '#Offset [^\s]+#'
- '#Access to [^\s]+#'
- '#Strict comparison using \=\=\= between ''no'' and true will always evaluate to false.#'