Skip to content

Commit 020bacf

Browse files
committed
fix
1 parent b82c655 commit 020bacf

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

phpstan.neon

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ includes:
33
- config/naming-rules.neon
44

55
parameters:
6+
treatPhpDocTypesAsCertain: false
7+
68
level: 8
79

810
paths:
@@ -38,8 +40,6 @@ parameters:
3840

3941
- '#Method Symplify\\PHPStanRules\\Reflection\\ReflectionParser\:\:parseNativeClassReflection\(\) has parameter \$reflectionClass with generic class ReflectionClass but does not specify its types\: T#'
4042

41-
- '#Method Symplify\\PHPStanRules\\NodeFinder\\TypeAwareNodeFinder\:\:findFirstInstanceOf\(\) should return \(TNode of PhpParser\\Node\)\|null but returns PhpParser\\Node\|null#'
42-
4343
# overly detailed
4444
- '#Class Symplify\\PHPStanRules\\(.*?) extends generic class PHPStan\\Testing\\RuleTestCase but does not specify its types\: TRule#'
4545
- '#Method Symplify\\PHPStanRules\\(.*?)\:\:getRule\(\) return type with generic interface PHPStan\\Rules\\Rule does not specify its types\: TNodeType#'
@@ -50,5 +50,26 @@ parameters:
5050
# overly detailed
5151
- '#Class Symplify\\PHPStanRules\\Collector\\(.*?) implements generic interface PHPStan\\Collectors\\Collector but does not specify its types\: TNodeType, TValue#'
5252

53-
# used in tests
54-
- '#Public constant "(.*?)\:\:ERROR_MESSAGE" is never used#'
53+
-
54+
identifier: argument.type
55+
56+
-
57+
identifier: phpstanApi.instanceofType
58+
59+
-
60+
identifier: return.type
61+
62+
-
63+
identifier: class.notFound
64+
65+
-
66+
identifier: phpstanApi.runtimeReflection
67+
68+
-
69+
identifier: phpstanApi.instanceofAssumption
70+
71+
-
72+
identifier: generics.wrongParent
73+
74+
-
75+
identifier: method.childReturnType

src/Rules/NoReferenceRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPStan\Rules\RuleError;
88
use PhpParser\Node;
99
use PhpParser\Node\Arg;
10-
use PhpParser\Node\Expr\ArrayItem;
10+
use PhpParser\Node\ArrayItem;
1111
use PhpParser\Node\Expr\ArrowFunction;
1212
use PhpParser\Node\Expr\AssignRef;
1313
use PhpParser\Node\Expr\Closure;

src/Rules/PreferredClassRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2323

2424
/**
25-
* @implements Rule<>
25+
* @implements Rule<Node>
2626
* @see \Symplify\PHPStanRules\Tests\Rules\PreferredClassRule\PreferredClassRuleTest
2727
*/
2828
final class PreferredClassRule extends AbstractSymplifyRule implements ConfigurableRuleInterface

0 commit comments

Comments
 (0)