Skip to content

Commit

Permalink
Remove non-deterministic to class children detector (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 31, 2024
1 parent 44d177b commit 8d1aab2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.

This file was deleted.

5 changes: 0 additions & 5 deletions rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@

use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Reflection\ClassReflection;
use Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer;
use Rector\NodeNameResolver\NodeNameResolver;

final class BuiltInMethodAnalyzer
{
public function __construct(
private readonly NodeNameResolver $nodeNameResolver,
private readonly ClassChildAnalyzer $classChildAnalyzer
) {
}

Expand All @@ -24,9 +22,6 @@ public function isImplementsBuiltInInterface(ClassReflection $classReflection, C
}

$methodName = $this->nodeNameResolver->getName($classMethod);
if ($this->classChildAnalyzer->hasChildClassMethod($classReflection, $methodName)) {
return false;
}

foreach ($classReflection->getInterfaces() as $interfaceReflection) {
if (! $interfaceReflection->isBuiltin()) {
Expand Down

0 comments on commit 8d1aab2

Please sign in to comment.