From 069aa27bb4f1c1160f72c842c1f7dfabad211aef Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 13 Jan 2017 01:22:09 +0300 Subject: [PATCH] Unnecessary checks removed from UserRepository. --- .../Bundle/PointToolsBundle/Repository/UserRepository.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Repository/UserRepository.php b/src/Skobkin/Bundle/PointToolsBundle/Repository/UserRepository.php index 9a11bb4..58a2d84 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Repository/UserRepository.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Repository/UserRepository.php @@ -66,10 +66,6 @@ class UserRepository extends EntityRepository */ public function findUserSubscribersById(int $id): array { - if (!is_int($id)) { - throw new \InvalidArgumentException('$id must be an integer'); - } - $qb = $this->createQueryBuilder('u'); return $qb @@ -89,10 +85,6 @@ class UserRepository extends EntityRepository */ public function getTopUsers(int $limit = 30): array { - if (!is_int($limit)) { - throw new \InvalidArgumentException('$limit must be an integer'); - } - $qb = $this->getEntityManager()->getRepository('SkobkinPointToolsBundle:Subscription')->createQueryBuilder('s'); $rows = $qb