use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Adapter\DoctrineORMAdapter;
use Pagerfanta\Pagerfanta;
use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Adapter\DoctrineORMAdapter;
use Pagerfanta\Pagerfanta;
* @param int $userId
* @param string $type Can be unread, archive, starred, etc
*
* @param int $userId
* @param string $type Can be unread, archive, starred, etc
*
// random select one in the list
$randomId = $ids[mt_rand(0, \count($ids) - 1)]['id'];
// random select one in the list
$randomId = $ids[mt_rand(0, \count($ids) - 1)]['id'];