Unnecessary checks removed from UserRepository.
This commit is contained in:
parent
72a408fa56
commit
069aa27bb4
|
@ -66,10 +66,6 @@ class UserRepository extends EntityRepository
|
||||||
*/
|
*/
|
||||||
public function findUserSubscribersById(int $id): array
|
public function findUserSubscribersById(int $id): array
|
||||||
{
|
{
|
||||||
if (!is_int($id)) {
|
|
||||||
throw new \InvalidArgumentException('$id must be an integer');
|
|
||||||
}
|
|
||||||
|
|
||||||
$qb = $this->createQueryBuilder('u');
|
$qb = $this->createQueryBuilder('u');
|
||||||
|
|
||||||
return $qb
|
return $qb
|
||||||
|
@ -89,10 +85,6 @@ class UserRepository extends EntityRepository
|
||||||
*/
|
*/
|
||||||
public function getTopUsers(int $limit = 30): array
|
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');
|
$qb = $this->getEntityManager()->getRepository('SkobkinPointToolsBundle:Subscription')->createQueryBuilder('s');
|
||||||
|
|
||||||
$rows = $qb
|
$rows = $qb
|
||||||
|
|
Loading…
Reference in a new issue