public function updateRule(Rule $rule): void
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->update('ngbm_rule')
            ->set('layout_id', ':layout_id')
            ->set('comment', ':comment')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $rule->id, Type::INTEGER)
            ->setParameter('layout_id', $rule->layoutId, Type::INTEGER)
            ->setParameter('comment', $rule->comment, Type::STRING);

        $this->applyStatusCondition($query, $rule->status);

        $query->execute();
    }