src/Common/ShippingMethodBag.php
public function add($item)
    {
        if ($item instanceof ShippingMethodInterface) {
            $this->items[] = $item;
        } else {
            $this->items[] = new Item($item);
        }
    }
public function add($item)
    {
        if ($item instanceof ShippingMethodInterface) {
            $this->items[] = $item;
        } else {
            $this->items[] = new Item($item);
        }
    }
Add an item to the bag

@see Item

@param ShippingMethodInterface|array $item An existing item, or associative array of item parameters