{ $this->
addCondition($condition,
$query);
} private function addCondition(LengthCondition
$condition, QueryBuilder
$query): void
{ $this->variantHelper->
joinVariants($query);
$min = ':minLength' .
md5(json_encode($condition, JSON_THROW_ON_ERROR
));
$max = ':maxLength' .
md5(json_encode($condition, JSON_THROW_ON_ERROR
));
if ($condition->
getMinLength() > 0
) { $query->
andWhere('allVariants.length >= ' .
$min);
$query->
setParameter($min,
$condition->
getMinLength());
} if ($condition->
getMaxLength() > 0
) { $query->
andWhere('allVariants.length <= ' .
$max);
$query->
setParameter($max,
$condition->
getMaxLength());
} }}