Skip to content

Commit

Permalink
Also forward methods on Eloquent Buidler if bound to unspecific Model
Browse files Browse the repository at this point in the history
  • Loading branch information
nagmat84 committed Jul 3, 2022
1 parent b8331c1 commit f660f26
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Methods/EloquentBuilderForwardsCallsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateObjectType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;

Expand Down Expand Up @@ -89,14 +87,6 @@ private function findMethod(ClassReflection $classReflection, string $methodName
return null;
}

if ($modelType instanceof TemplateObjectType) {
$modelType = $modelType->getBound();

if ($modelType->equals(new ObjectType(Model::class))) {
return null;
}
}

if ($modelType instanceof TypeWithClassName) {
$modelReflection = $modelType->getClassReflection();
} else {
Expand Down

0 comments on commit f660f26

Please sign in to comment.