From de4c854ac955526285eab6111b9ba9a446d44b62 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 8 Sep 2016 00:48:52 +0200 Subject: [PATCH] #6003 removed useless `count()` call --- lib/Doctrine/ORM/EntityRepository.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/EntityRepository.php b/lib/Doctrine/ORM/EntityRepository.php index 7ba60b71e..cdd90baf0 100644 --- a/lib/Doctrine/ORM/EntityRepository.php +++ b/lib/Doctrine/ORM/EntityRepository.php @@ -302,9 +302,7 @@ class EntityRepository implements ObjectRepository, Selectable */ private function resolveMagicCall($method, $by, array $arguments) { - $argsCount = count($arguments); - - if (0 === $argsCount) { + if (! $arguments) { throw ORMException::findByRequiresParameter($method . $by); }