forked from rectorphp/rector-phpunit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
51 lines (39 loc) · 1.6 KB
/
phpstan.neon
File metadata and controls
51 lines (39 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
44
45
46
47
48
49
50
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#'
# 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: assign.propertyType
# not relevant
- '#Method (.*?)provideMinPhpVersion\(\) never returns \d+ so it can be removed from the return type#'
# chicken-egg false positive
-
message: '#Parameter \#1 \$value of static method Webmozart\\Assert\\Assert\:\:isAOf\(\) expects object\|string, PhpParser\\Node\\Stmt\\Class_\|null given#'
path: rules/AnnotationsToAttributes/Rector/Class_/AnnotationWithValueToAttributeRector.php