public function getRanking(Chart $chart, $player = null, $limit = null)
    {
        $queryBuilder = $this->getRankingBaseQuery($chart);
        $queryBuilder
            ->andWhere('status.boolRanking = 1');

        if (null !== $limit && null !== $player) {
            $queryBuilder
                ->andWhere(
                    $queryBuilder->expr()->orX('pc.rank <= :maxRank', 'pc.player = :player')
                )
                ->setParameter('maxRank', $limit)
                ->setParameter('player', $player);
        } elseif (null !== $limit) {
            $queryBuilder
                ->andWhere('pc.rank <= :maxRank')
                ->setParameter('maxRank', $limit);
        }

        return $queryBuilder->getQuery()->getResult();
    }