Directly increase already existing item

@param Item  $item     Item to add.
@param int   $quantity Item quantity in cart.
@return Item
978521
public function increase($item, $quantity = 1, $quantityReset = false)
    {
        $item->quantity = $quantityReset
            ? $quantity
            : $item->quantity + $quantity;
        $item->save();

        $this->resetCalculations();
        return $this;
    }
370107
public function addItem($product, $quantity, $detail, $price)
    {
        $item = new stdClass();
        $item->product = $product;
        $item->quantity = $quantity;
        $item->detail = $detail;
        $item->price = $this->convertAmount($price);

        $this->data->items[] = $item;

        return $this;
    }
311405
public function updateProductQuantity(Product $product, $quantity)
    {
        $lineItem = $this->getLineItemForProduct($product);

        // Check if there is enough product available
        if ($quantity > $product->getQuantityAvailable())
        {
            throw new \Exception('Not enough product available');
        }

        // Don't remove more than is in cart
        if ($quantity < 0)
        {
            throw new \Exception('Cannot have negative quantity');
        }

        // Update quantity
        $lineItem->setQuantity($quantity);

        // Whenever we add new items, we update the price to the most recent
        $lineItem->setPrice($product->getPrice());

        // Update Order totals
        $this->updateTotals();

        return $lineItem;
    }
835635
public function newItemUpdateStruct(?Item $item = null): ItemUpdateStruct
    {
        $itemUpdateStruct = new ItemUpdateStruct();

        if (!$item instanceof Item) {
            return $itemUpdateStruct;
        }

        $this->configStructBuilder->buildConfigUpdateStructs($item, $itemUpdateStruct);

        return $itemUpdateStruct;
    }
1113113
public function add(Item $item)
    {
        foreach ($this->filters as $filter) {
            $this->applyFilter($filter, $item);
        }

        $this->items[] = $item;

        return $this;
    }
990645
public function increment($itemHash)
    {
        $item = $this->getItem($itemHash);
        $item->qty++;
        $this->update();

        return $item;
    }
602631
public function addItem(\Lyon1\Bundle\PoobleBundle\Entity\SurveyItem $item)
    {
        $item->setSurvey($this);
        $this->items[] = $item;

        return $this;
    }
966024
public function itemCreate(Item $item)
    {
        $response = $this->getGuzzleClient()
            ->post(
                '/items',
                array_merge($this->setQuery(), $this->setBody($item))
            );

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            Item::class,
            'json'
        );
    }
440935
protected function setItemSupplier($item, $product)
    {
        // get products supplier
        if ($product->getSupplier()) {
            $item->setSupplier($product->getSupplier());
            $item->setSupplierName($product->getSupplier()->getName());
        } else {
            $item->setSupplier(null);
            $item->setSupplierName('');
        }
    }
147546
public function decrementQuantityAt($cartItemIndex, $quantity = 1)
    {
        $this->existenceCheckFor($cartItemIndex);

        if ($this->items[$cartItemIndex]->quantity <= $quantity) {
            return $this->removeAt($cartItemIndex);
        }

        $this->items[$cartItemIndex]->quantity -= $quantity;

        $this->cartDriver->setCartItemQuantity(
            $this->items[$cartItemIndex]->id,
            $this->items[$cartItemIndex]->quantity
        );

        return $this->cartUpdates();
    }
256469
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->setStorage($this);
        }

        return $this;
    }
1192150
public function add($item)
    {
        if (is_array($item)) {
            foreach ($item as $element) {
                $this->add($element);
            }
        } else if (! $this->contains($item->path())) {
            $this->items[$item->path()] = [
                'instance' => $item,
                'listener_index' => $item->addPathListener([$this, 'updatePath'])
            ];
        }
        return $this;
    }
1006940
public function add($item)
    {
        $allItems = $this->getAll();
        if (is_array($item)) {
            $allItems = array_merge($allItems, $item);
        } else {
            $allItems[] = $item;
        }

        $this->setAll($allItems);
    }
437515
public function updateQuantity($quantity)
    {
        $quantity = max(0, $quantity - 1);

        $addonName = $this->braintree_plan.'-quantity';

        $options = ['remove' => [$addonName]];

        if ($quantity > 0) {
            $options = $this->quantity > 1
                ? ['update' => [['existingId' => $addonName, 'quantity' => $quantity]]]
                : ['add' => [['inheritedFromId' => $addonName, 'quantity' => $quantity]]];
        }

        BraintreeSubscription::update($this->braintree_id, ['addOns' => $options]);

        $this->quantity = $quantity + 1;

        $this->save();

        return $this;
    }
640376
public function addItem(\Wucdbm\Bundle\MenuBuilderBundle\Entity\MenuItem $item) {
        $this->items[] = $item;

        return $this;
    }
605795
public function addItem(AdvantagesItem $item)
    {
        $item->setAdvantages($this);

        $this->getItems()->add($item);

        return $this;
    }
33276
public function addItem(\Flowcode\ShopBundle\Entity\StockTransferItem $item)
    {
        $this->items[] = $item;

        return $this;
    }