if ($getParams->get('name')) {
$qb->andWhere('t.name = :name')
->setParameter('name', $getParams->get('name'));
}
$params = [];
if ($getParams->get('name')) {
$qb->andWhere('t.name = :name');
$params['name'] = $getParams->get('name');
}
$qb->setParameters($params);