andWhere('.user = :user') ->setParameter('user', $user); } public function filterByStatus($statusArray): self { return $this ->andWhere('.status IN (:status)') ->setParameter('status', $statusArray); } public function selectCount(): self { return $this ->select('count(r.id) as count'); } }