Skip to content

Commit 5f72c48

Browse files
Merge pull request #99 from oliverklee/task/performance
[TASK] Reorder a condition to improve performance
2 parents ab386cb + 15217f2 commit 5f72c48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Type/RepositoryFindAllDynamicReturnTypeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function getTypeFromMethodCall(
4040
{
4141
$variableType = $scope->getType($methodCall->var);
4242

43-
if ($methodReflection->getDeclaringClass()->getName() !== Repository::class
44-
|| !$variableType instanceof TypeWithClassName) {
43+
if (!$variableType instanceof TypeWithClassName
44+
|| $methodReflection->getDeclaringClass()->getName() !== Repository::class) {
4545
return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
4646
}
4747

0 commit comments

Comments
 (0)