From 434b4f880ff10875a2ef3a2dd4cabecd06236162 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 28 Jan 2022 16:22:20 +0200 Subject: [PATCH] fix phpstan ext --- dev/PHPStan/Extensions/EntityManagerReturnType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/PHPStan/Extensions/EntityManagerReturnType.php b/dev/PHPStan/Extensions/EntityManagerReturnType.php index ac397d45dd..9d9340c721 100644 --- a/dev/PHPStan/Extensions/EntityManagerReturnType.php +++ b/dev/PHPStan/Extensions/EntityManagerReturnType.php @@ -60,6 +60,7 @@ class EntityManagerReturnType implements DynamicMethodReturnTypeExtension private $supportedMethodNameList = [ 'getEntity', 'getNewEntity', + 'getEntityById', 'createEntity', 'getRDBRepository', 'getRepository', @@ -88,7 +89,7 @@ class EntityManagerReturnType implements DynamicMethodReturnTypeExtension $methodName = $methodReflection->getName(); - if ($methodName === 'getEntity') { + if ($methodName === 'getEntity' || $methodName === 'getEntityById') { return $this->getGetEntity($methodReflection, $methodCall, $scope); }