forked from rectorphp/rector-phpunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
44 lines (32 loc) · 1.75 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
parameters:
level: 8
paths:
- config
- src
- tests
- rules
- rules-tests
reportUnmatchedIgnoredErrors: false
cognitive_complexity:
class: 50
function: 10
scanDirectories:
- stubs
excludePaths:
- */Source/*
- *Source/*
- */Fixture/*
- */Expected/*
ignoreErrors:
# phpstan false positive
- '#Parameter \#1 \$className of method Rector\\Core\\PhpParser\\AstResolver\:\:resolveClassMethod\(\) expects class\-string, string given#'
# rector co-variant
- '#Parameter \#1 \$node (.*?) of method Rector\\(.*?)\(\) should be contravariant with parameter \$node \(PhpParser\\Node\) of method Rector\\Core\\Contract\\Rector\\PhpRectorInterface\:\:refactor\(\)#'
- '#Cognitive complexity for "Rector\\PHPUnit\\Rector\\ClassMethod\\CreateMockToAnonymousClassRector\:\:refactor\(\)" is 25, keep it under 10#'
# double type chdck
- '#Call to static method Webmozart\\Assert\\Assert\:\:allIsInstanceOf\(\) with array<PhpParser\\Node\\Arg> and (.*?) will always evaluate to true#'
# false positive
- '#Access to an undefined property Rector\\Core\\Contract\\PhpParser\\Node\\StmtsAwareInterface\:\:\$stmts#'
- '#Parameter \#2 \.\.\.\$arrays of function array_merge expects array, array<PhpParser\\Node\\Stmt>\|null given#'
- '#Return type (.*?) should be covariant with return type \(1\|2\|3\|4\|array<PhpParser\\Node>\|PhpParser\\Node\|null\) of method Rector\\Core\\Contract\\Rector\\PhpRectorInterface\:\:refactor\(\)#'
- '#Cognitive complexity for "Rector\\PHPUnit\\PHPUnit60\\Rector\\MethodCall\\DelegateExceptionArgumentsRector\:\:refactor\(\)" is 11, keep it under 10#'