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); }