diff --git a/lib/Doctrine/ORM/EntityRepository.php b/lib/Doctrine/ORM/EntityRepository.php
index <HASH>..<HASH> 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);
         }
#<I> removed useless `count()` call