Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
133 lines (125 loc) · 5.37 KB
/
Copy pathphpstan.neon
File metadata and controls
133 lines (125 loc) · 5.37 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# https://phpstan.org/config-reference
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
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: 6
ignoreErrors:
# Errors in third party code, and our interfaces to it
- message: '#Property .* does not accept false#'
path: pinc/3rdparty/mediawiki/DairikiDiff.php
- message: '#Parameter &\$changed by-ref type of method DiffEngine::shiftBoundaries\(\) expects .* given#'
path: pinc/3rdparty/mediawiki/DiffEngine.php
- message: '#^Parameter \#2 \$.* of function array_fill expects int, float given\.$#'
path: pinc/3rdparty/mediawiki/DiffEngine.php
- message: '#Assign to \$.* overwrites the last element from array\.$#'
path: pinc/3rdparty/mediawiki/DiffEngine.php
- message: '#If condition is always false\.$#'
path: pinc/3rdparty/mediawiki/DiffFormatter.php
- message: '#Instantiated class DiffFormatter is abstract#'
path: pinc/DifferenceEngineWrapper.inc
- message: '#Call to function is_array\(\) with array<string> will always evaluate to true.#'
path: pinc/3rdparty/mediawiki/WordLevelDiff.php
- message: '#Function get_dpl_enforcement_for_user\(\) never returns null.*#'
path: pinc/daily_page_limit.inc
- message: '#Variable .* might not be defined#'
- message: '#Constant .* not found#'
# 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
# Level 6 errors in third party code, and our interfaces to it
- message: '#^Property .* has no type specified\.$#'
paths:
- pinc/3rdparty/mediawiki/*.php
- message: '#^Method .* has parameter \$.* with no type specified\.$#'
paths:
- pinc/BBDiffFormatter.inc
- pinc/3rdparty/mediawiki/*.php
- message: '#^Method .* has no return type specified\.$#'
paths:
- pinc/BBDiffFormatter.inc
- pinc/3rdparty/mediawiki/*.php
- message: '#^Method .* has parameter \$.* with no value type specified in iterable type array.$#'
paths:
- pinc/BBDiffFormatter.inc
- pinc/3rdparty/mediawiki/*.php
- message: '#^Method .* return type has no value type specified in iterable type array.$#'
paths:
- pinc/3rdparty/mediawiki/*.php
typeAliases:
# TODO: data.y should be numeric list, but callers needs fixing
GraphConfig: """
array{
width?: int,
height?: int,
axisLeft?: bool,
yAxisLabel?: string,
xAxisHeight?: int,
yAxisTickCount?: int,
groupBars?: bool,
barColors?: string[],
title?: string,
downloadLabel?: string,
legendAdjustment?: array{x?: int, y?: int},
bottomLegend?: string,
labels?: string[],
error?: string,
data: int[]|array<
string,
array{type?: string, x: string[], y: mixed[]}
>,
}
"""
# TODO: Fix duplication between this and class SpecialDay
SpecialDayInfo: """
array{
spec_code?: string,
display_name: string,
enable?: int,
comment?: string,
color: string,
open_day?: int,
open_month?: int,
close_day?: int,
close_month?: int,
date_changes?: string,
info_url?: string,
image_url?: string,
symbol: string,
option_label?: string,
}
"""
HeaderExtraArgs: """
array{
frameset?: bool, // false (default) | true
head_data?: string, // string to output as-is in <head> tag
css_files?: string[], // CSS files to include in the page
css_data?: string, // CSS to include in the page
js_data?: string, // JS code to include in the page,
js_files?: string[], // array of .js files to link to
js_modules?: string[], // array of .js files to link astype=module
js_module_data?: string, // <script type='module'> code to include
body_attributes?: string, // body tag attributes to output
}
"""