-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
57 lines (41 loc) · 2.76 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
parameters:
level: 8
paths:
- config
- src
- tests
scanDirectories:
- stubs
excludePaths:
- */Source/*
- */Source*/*
- *Source/*
- */tests/*/Fixture*/Expected/*
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# @todo update in rules package
-
message: '#Instead of "instanceof/is_a\(\)" use ReflectionProvider service or "\(new ObjectType\(<desired_type\>\)\)\-\>isSuperTypeOf\(<element_type\>\)" for static reflection to work#'
path: src/ValueObjectFactory/ServiceMapFactory.php
- '#Method Rector\\Symfony\\Rector\\Property\\JMSInjectPropertyToConstructorInjectionRector\:\:resolveServiceType\(\) has parameter \$phpDocInfo with generic class Rector\\BetterPhpDocParser\\PhpDocInfo\\PhpDocInfo but does not specify its types\: TNode#'
- '#Parameter \#1 \$class of method Rector\\BetterPhpDocParser\\PhpDocInfo\\PhpDocInfo<PHPStan\\PhpDocParser\\Ast\\Node\>\:\:(.*?)\(\) expects class\-string, string given#'
# rector co-variant
- '#Parameter \#1 \$node \(PhpParser\\Node\\(.*?) of method Rector\\(.*?)\(\) should be contravariant with parameter \$node \(PhpParser\\Node\) of method Rector\\Core\\Contract\\Rector\\PhpRectorInterface\:\:refactor\(\)#'
# generics false positive
- '#Method Rector\\Symfony\\Rector\\ClassMethod\\RenderMethodParamToTypeDeclarationRector\:\:refactorParam\(\) has parameter \$phpDocInfo with generic class Rector\\BetterPhpDocParser\\PhpDocInfo\\PhpDocInfo but does not specify its types\: TNode#'
# closure/callable
- '#Parameter \#2 \$filter of method Rector\\Core\\PhpParser\\Node\\BetterNodeFinder\:\:findFirstPrevious\(\) expects callable\(PhpParser\\Node\)\: bool, Closure\(PhpParser\\Node\)\: PhpParser\\Node\\Expr\\Assign\|null given#'
# in test, fixtures exists
-
message: '#Parameter \#2 \$fileContent of class Rector\\FileSystemRector\\ValueObject\\AddedFileWithContent constructor expects string, string\|false given#'
path: tests
- '#Dynamic call to static method PHPUnit\\Framework\\Assert\:\:(.*?)(.*?)\(\)#'
-
path: "src/ValueObjectFactory/ServiceMapFactory.php"
message: '#@simplexml_load_string(.*?) is forbidden to use#'
# known type
- '#Parameter \#1 \$className of method Rector\\Core\\Reflection\\ReflectionResolver\:\:resolveMethodReflection\(\) expects class\-string, string given#'
# known array
-
message: '#Property PhpParser\\Node\\Expr\\Closure\:\:\$stmts \(array<PhpParser\\Node\\Stmt>\) does not accept array<PhpParser\\Node\\Stmt>\|null#'
path: src/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php