public function getLowestRulePriority(): ?int
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('priority')
            ->from('ngbm_rule_data');

        $query->addOrderBy('priority', 'ASC');
        $this->applyOffsetAndLimit($query, 0, 1);

        $data = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return isset($data[0]['priority']) ? (int) $data[0]['priority'] : null;
    }