src/PHPDish/Bundle/ForumBundle/Service/TopicManager.php
public function getUserTopicCount(UserInterface $user)
    {
        $qb = $this->getTopicRepository()->createQueryBuilder('p');
        $qb->select($qb->expr()->count('p'))
            ->where('p.enabled = :enabled')->setParameter('enabled', true)
            ->andWhere('p.user = :user')->setParameter('user', $user);
        return $qb->getQuery()->getSingleScalarResult();
    }
public function getUserTopicCount(UserInterface $user)
    {
        $qb = $this->getTopicRepository()->createQueryBuilder('p');
        $qb->select($qb->expr()->count('p'))
            ->where('p.enabled = :enabled')->setParameter('enabled', true)
            ->andWhere('p.user = :user')->setParameter('user', $user);
        return $qb->getQuery()->getSingleScalarResult();
    }
{@inheritdoc}