public function getNextSortValue(array $scope = []): int
    {
        $query = $this->_table->query();
        $scope = Hash::merge($this->getConfig('scope'), $scope);
        if (!empty($scope)) {
            $query->where($scope);
        }
        $query->select([
            'maxSort' => $query->func()->max($this->getConfig('sortField')),
        ]);
        $res = $query->enableHydration(false)->first();
        if (empty($res)) {
            return 1;
        }

        return ($res['maxSort'] + 1);
    }