-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathphpstan.neon
More file actions
54 lines (41 loc) · 1.49 KB
/
phpstan.neon
File metadata and controls
54 lines (41 loc) · 1.49 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
parameters:
level: 8
paths:
- config
- src
- tests
- rules
- rules-tests
reportUnmatchedIgnoredErrors: false
errorFormat: symplify
scanDirectories:
- stubs
excludePaths:
- */Source/*
- *Source/*
- */Fixture/*
- */Expected/*
# 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
-
identifier: assign.propertyType
-
message: '#Cannot call method getName\(\) on PHPStan\\Reflection\\ClassReflection\|null#'
path: rules/CodeQuality/Reflection/MethodParametersAndReturnTypesResolver.php