/
phpstan.neon
70 lines (51 loc) · 3.17 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
60
61
62
63
64
65
66
67
68
69
includes:
- vendor/symplify/phpstan-rules/config/symplify-rules.neon
parameters:
level: 8
reportUnmatchedIgnoredErrors: false
# requires exact closure types
checkMissingCallableSignature: true
paths:
- src
- config
- rules
- tests
- rules-tests
excludePaths:
# tests files
- "*/Expected/*"
- '*/Fixture/*'
- '*/Source/*'
ignoreErrors:
# php enum value minus
- '#Parameter \#1 \$phpVersion of method Rector\\Config\\RectorConfig\:\:phpVersion\(\) expects (.*?), (.*?) given#'
# part of implicit contract
- '#Call to an undefined method PHPStan\\Type\\ConstantType\:\:getValue\(\)#'
- '#Calling PHPStan\\Reflection\\Native\\NativeFunctionReflection\:\:getName\(\) is not covered by backward compatibility promise\. The method might change in a minor PHPStan version#'
-
message: '#New objects with "\$functionLikeReflection" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php
# nullable correction type
-
message: '#New objects with "\$parentReturnTypeNode" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php
# cleaning expr
-
message: '#New objects with "\$bitwiseOr" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php
- '#Method "decorateReturnWithSpecificType\(\)" returns bool type, so the name should start with is/has/was#'
- '#Method "decorateParamWithSpecificType\(\)" returns bool type, so the name should start with is/has/was#'
-
message: '#New objects with "\$returnType" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php
- '#Parameter \#3 \$stmt of method Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradePregUnmatchedAsNullConstantRector\:\:processReplace\(\) expects PhpParser\\Node\\Stmt, PhpParser\\Node given#'
- '#(.*?)\:\:refactor\(\) should return array<PhpParser\\Node\\Stmt>\|PhpParser\\Node\\Stmt\\ClassConst\|null but returns array<PhpParser\\Node\\Stmt>\|PhpParser\\Node\\Stmt\|null#'
-
message: '#Use value object over return of values#'
path: rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php
# phpstan need to load rector nodes first to avoid this
- '#Rector\\Core\\Contract\\PhpParser\\Node\\StmtsAwareInterface#'
- '#Access to an undefined property Rector\\Contract\\PhpParser\\Node\\StmtsAwareInterface\:\:\$stmts#'
-
message: '#Parameter \#1 \$attributeClass of class Rector\\DowngradePhp80\\ValueObject\\DowngradeAttributeToAnnotation constructor expects class\-string, string given#'
path: "config/*"