public function findAverageNote(Thread $thread)
    {
        return $this->repository->createQueryBuilder('c')
            ->select('avg(c.note)')
            ->where('c.private <> :private')
            ->andWhere('c.thread = :thread')
            ->setParameters([
                'private' => 1,
                'thread' => $thread,
            ])
            ->getQuery()
            ->getSingleScalarResult();
    }