-
Notifications
You must be signed in to change notification settings - Fork 48
/
phpstan.neon
59 lines (44 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
parameters:
level: 8
paths:
- config
- src
- tests
- rules
- rules-tests
reportUnmatchedIgnoredErrors: false
scanDirectories:
- stubs
excludePaths:
- */Source/*
- *Source/*
- */Fixture/*
- */Expected/*
# to be enabled later once rector upgraded to use phpstan v2
# # see https://github.com/rectorphp/type-perfect/
# type_perfect:
# no_mixed: true
# null_over_false: true
# narrow_param: true
# narrow_return: true
ignoreErrors:
# phpstan false positive
- '#Parameter \#1 \$className of method Rector\\PhpParser\\AstResolver\:\:resolveClassMethod\(\) expects class\-string, string given#'
# false positive
- '#Access to an undefined property Rector\\Contract\\PhpParser\\Node\\StmtsAwareInterface\:\:\$stmts#'
- '#PhpParser\\Node\\Stmt\\Expression is not generic#'
# more advanced usage, but not always working
# see https://github.com/rectorphp/rector-src/actions/runs/11798721617/job/32865546672?pr=6422#step:5:110
- '#Doing instanceof PHPStan\\Type\\.+ is error\-prone and deprecated#'
-
identifier: instanceof.alwaysTrue
-
identifier: argument.type
# phpstan instanceof
-
identifier: phpstanApi.instanceofAssumption
-
identifier: phpstanApi.varTagAssumption
-
identifier: assign.propertyType
- '#::provideMinPhpVersion\(\) never returns \d+ so it can be removed from the return type#'