File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 18
18
"phpstan/phpstan-strict-rules" : " ^2.0.0" ,
19
19
"phpunit/phpunit" : " ^10.5" ,
20
20
"shipmonk/composer-dependency-analyser" : " ^1.8.1" ,
21
- "shipmonk/dead-code-detector" : " ^0.9.2 " ,
21
+ "shipmonk/dead-code-detector" : " ^0.10.0 " ,
22
22
"shipmonk/name-collision-detector" : " ^2.1.1" ,
23
23
"shipmonk/phpstan-rules" : " ^4.0.0" ,
24
24
"slevomat/coding-standard" : " dev-master"
Original file line number Diff line number Diff line change 4
4
5
5
use ReflectionMethod ;
6
6
use ShipMonk \PHPStan \DeadCode \Provider \ReflectionBasedMemberUsageProvider ;
7
+ use ShipMonk \PHPStan \DeadCode \Provider \VirtualUsageData ;
7
8
8
9
class IgnoreDeadInterfaceUsageProvider extends ReflectionBasedMemberUsageProvider
9
10
{
10
11
11
- public function shouldMarkMethodAsUsed (ReflectionMethod $ method ): bool
12
+ public function shouldMarkMethodAsUsed (ReflectionMethod $ method ): ? VirtualUsageData
12
13
{
13
- return $ method ->getDeclaringClass ()->isInterface () || $ method ->isAbstract ();
14
+ if ($ method ->getDeclaringClass ()->isInterface () || $ method ->isAbstract ()) {
15
+ return VirtualUsageData::withNote ('interface methods kept for unification ' );
16
+ }
17
+
18
+ return null ;
14
19
}
15
20
16
21
}
You can’t perform that action at this time.
0 commit comments