protected function conditions(AbstractSearch $search, array $matches, $negate)
{
if (!$search instanceof DiscussionSearch) {
throw new LogicException('This gambit can only be applied on a DiscussionSearch');
}
$search->getQuery()->where(function ($query) use($negate) {
if ($negate) {
$query->whereNull('hide_time')->where('comments_count', '>', 0);
} else {
$query->whereNotNull('hide_time')->orWhere('comments_count', 0);
}
});
}