src/EntityQueryBuilder.php
public function fetchSingle(array $parameters = [], $hydrationMode = null)
    {
        $this->appendParameters($parameters);
        $this->limit(1, 0);

        return $this->getQuery()->getSingleResult($hydrationMode);
    }
public function fetchSingle(array $parameters = [], $hydrationMode = null)
    {
        $this->appendParameters($parameters);
        $this->limit(1, 0);

        return $this->getQuery()->getSingleResult($hydrationMode);
    }
Fetch first column of first result row.

@param array $parameters
@param int   $hydrationMode

@return mixed
@throws \Doctrine\ORM\NonUniqueResultException
@throws \Doctrine\ORM\NoResultException
@throws \Xloit\Bridge\Doctrine\ORM\Exception\InvalidArgumentException