Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
43 lines (42 loc) · 1.6 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
43 lines (42 loc) · 1.6 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
# PHPStan: finds calls to functions, methods and classes that do not exist,
# wrong argument counts and types, and code that cannot run, using the
# WordPress stubs (szepeviktor/phpstan-wordpress) and PHP 7.4's functions.
#
# phpstan-baseline.neon is empty: every finding fails the check. Fix the
# code. Where PHPStan or the stubs are wrong, add an entry under
# ignoreErrors with the identifier, the file and the reason: here for the
# files every plugin made from the starter shares, in phpstan-plugin.neon
# for this plugin's own files and paths. Never put findings in the baseline
# to get a change through.
includes:
- phpstan-baseline.neon
- phpstan-plugin.neon
parameters:
# Level 7: also union types, such as false from preg_split() or
# filemtime(), and arrays and objects of the wrong shape. Level 8: also
# null, such as preg_replace()'s on a failed match or a getter's for
# something not there, used as a value.
level: 8
ignoreErrors:
# Level 6 asks every parameter, return and property, and every array's
# contents, to carry a type. That is a large, low-value change to
# working code; the checks above still read the types that are given.
-
identifiers:
- missingType.iterableValue
- missingType.parameter
- missingType.property
- missingType.return
reportUnmatched: false
phpVersion: 70400
# Result cache, kept between CI runs so only changed files are analysed again.
tmpDir: .cache/phpstan
paths:
- seoprostack.php
- uninstall.php
- includes
- admin
bootstrapFiles:
- scripts/phpstan-bootstrap.php
reportUnmatchedIgnoredErrors: true
treatPhpDocTypesAsCertain: false