src/Laravel/Sorting/GroupSortingSet.php
public function add($group_name, GroupSortingInterface $sorting)
    {
        $field_name = $sorting->getFieldName();

        if(!($sorting->getGroup() == $group_name))
        {
            throw new BuildQueryException('Добавление сортировки по полю '.$field_name.' не в ту группу '.$group_name);
        }

        $this->addEmptyGroup($group_name);

        if(array_key_exists($field_name, $this->keys[$group_name]))
        {
            $this->items[$group_name][$this->keys[$group_name][$field_name]] = $sorting;
        }else{
            $this->items[$group_name][] = $sorting;
            $this->keys[$group_name][$field_name] = count($this->items[$group_name])-1;
        }

    }
public function add($group_name, GroupSortingInterface $sorting)
    {
        $field_name = $sorting->getFieldName();

        if(!($sorting->getGroup() == $group_name))
        {
            throw new BuildQueryException('Добавление сортировки по полю '.$field_name.' не в ту группу '.$group_name);
        }

        $this->addEmptyGroup($group_name);

        if(array_key_exists($field_name, $this->keys[$group_name]))
        {
            $this->items[$group_name][$this->keys[$group_name][$field_name]] = $sorting;
        }else{
            $this->items[$group_name][] = $sorting;
            $this->keys[$group_name][$field_name] = count($this->items[$group_name])-1;
        }

    }
@param string $group_name

@param GroupSortingInterface $sorting

@return void