-
Notifications
You must be signed in to change notification settings - Fork 28
/
phpstan.neon
50 lines (44 loc) · 2.06 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
50
# https://phpstan.org/config-reference
parameters:
fileExtensions:
- php
- inc
paths:
- .
excludePaths:
- SETUP/*
- vendor/*
- node_modules/*
bootstrapFiles:
- SETUP/phpstan_bootstrap.inc
- pinc/bootstrap.inc
tmpDir: .phpstan.cache
# https://phpstan.org/user-guide/rule-levels
# We want to gradually ratchet up the level here.
level: 5
ignoreErrors:
# Errors in third party code, and our interfaces to it
- message: '#Property .* does not accept false#'
path: pinc/3rdparty/mediawiki/DairikiDiff.php
- message: '#Comparison operation .* results in an error#'
path: pinc/3rdparty/mediawiki/DiffEngine.php
- message: '#^Parameter \#2 \$.* of function array_fill expects int, float given\.$#'
path: pinc/3rdparty/mediawiki/DiffEngine.php
- message: '#Instantiated class DiffFormatter is abstract#'
path: pinc/DifferenceEngineWrapper.inc
- message: '#invoked with \d+ parameter(s?), \d+((-\d+)?) required#'
- message: '#Variable .* might not be defined#'
- message: '#Constant .* not found#'
# Low value and frequent L5 errors that are ignored by default.
- message: "#^Parameter \\#1 \\$.* of function array_multisort is passed by reference, so it expects variables only\\.$#"
- message: '#^Parameter \#\d+ .* of (static )?(function|method) .* expects string(\|null)?, int.* given\.$#'
# TODO(jchaffraix): Temporarily disabling those as they are dynamically created (see comment in Pool's constructor).
- message: "#^Access to an undefined property Pool::\\$project_available_state.$#"
path: pinc/ProjectState.inc
reportUnmatched: false
- message: "#^Access to an undefined property Pool::\\$project_checkedout_state.$#"
path: pinc/ProjectState.inc
reportUnmatched: false
- message: "#^Access to an undefined property Pool::\\$states.$#"
path: pinc/ProjectState.inc
reportUnmatched: false