@param StockItemInterface $item

@return UomQty
502345
public function getReservedQtyByMovement(StockItemInterface $item,
        Movement $mvt): UomQty
    {
        $units = $this->stockUnitRepository
            ->findBy(['stockItem' => $item, 'reservationMovement' => $mvt]);

        return $this->computeQtyForUnits($item->getUom(), $units);
    }
326660
public function save(CacheItemInterface $item)
    {
        $key = $item->getKey();
        $value = $item->get();

        $fileName = $this->fetchStreamUri($key);

        $filePath = pathinfo($fileName, PATHINFO_DIRNAME);

        if (!is_dir($filePath)) {
            mkdir($filePath, 0770, true);
        }

        if ($this->denyAccess) {
            $value = $this->options['deny_code'] . $value;
        }

        $success = $this->write(
            $fileName,
            $value,
            ($this->options['file_locking'] ? LOCK_EX : null)
        );

        return $success;
    }
1324445
public function matchItem(ItemInterface $item)
    {
        foreach ($this->currentUriWithAndWithoutSlash() as $path) {
            if (null === $path || null === $item->getUri()) {
                return null;
            }

            if ($item->getUri() === $path) {
                return true;
            }
        }

        return null;
    }
1123586
public function matchItem(ItemInterface $item)
    {
        if ($item->getExtra('link', false) && $this->parentControl) {
            $presenter = $this->parentControl->getPresenter(true);
            $item->setCurrent(call_user_func_array(array($presenter, 'isLinkCurrent'), $item->getExtra('link')));
            return $item->isCurrent();
        }
        return null;
    }
314056
protected function getFeeLine($item)
    {
        $quantity = $item->get_quantity();
        $feeEx = $item->get_total() / $quantity;
        $feeVat = $item->get_total_tax() / $quantity;

        $result = array(
                Tag::Product => $this->t($item->get_name()),
                Tag::UnitPrice => $feeEx,
                Tag::Quantity => $item->get_quantity(),
            ) + $this->getVatRangeTags($feeVat, $feeEx, $this->precision, $this->precision);

        return $result;
    }
1279816
private function updatePrices(ApiItemInterface $item, $data)
    {
        //TODO: currency
        $currency = null;

        // set products price by data
        if ($item->getUseProductsPrice() === false) {
            $item->setPrice($this->getProperty($data, 'price', $item->getPrice()));
        }

        // set items total net price
        $price = $this->itemPriceCalculator->calculate($item, $currency, $item->getUseProductsPrice());
        $item->setTotalNetPrice($price);

        // set items price
        $itemPrice = $this->itemPriceCalculator->getItemPrice($item, $currency, $item->getUseProductsPrice());
        $item->setPrice($itemPrice);
    }
661518
public function setItem(Item $item = null)
    {
        if ($this->item !== $item) {
            // romove link on this item for old item
            if ($this->item instanceof Item) {
                $tmp = $this->item;
                $this->item = null;
                $tmp->removeImage($this);
            }
            $this->item = $item;
            // add link on this item
            if ($item instanceof Item) {
                $this->item->addImage($this);
            }
        }

        return $this;
    }
227074
public function setItem(Item $item = null)
    {
        if ($this->item !== $item) {
            // romove link on this item for old item
            if ($this->item instanceof Item) {
                $tmp = $this->item;
                $this->item = null;
                $tmp->removeSource($this);
            }
            $this->item = $item;
            // add link on this item
            if ($item instanceof Item) {
                $this->item->addSource($this);
            }
        }

        return $this;
    }
1265533
public function set(CacheItem $item): self
    {
        $driver = $this->getDriver();
        $driver->set($item->key, $item->value, $item->ttl);
        if ($this->hasEventListeners('itemSet')) {
            $this->dispatchEvent('itemSet', new \BearFramework\App\Cache\ItemSetEventDetails(clone($item)));
        }
        if ($this->hasEventListeners('itemChange')) {
            $this->dispatchEvent('itemChange', new \BearFramework\App\Cache\ItemChangeEventDetails($item->key));
        }
        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'
        );
    }
578453
public function getByStockItemId($stockItemId)
    {
        $where = Entity::A_STOCK_ITEM_REF . '=' . (int)$stockItemId;
        $result = $this->get($where);
        return $result;
    }
1045931
protected function _canSubtractQty(
        \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem
    ) {
        $result = $stockItem->getManageStock() && $this->configStock->canSubtractQty();
        return $result;
    }
825373
public function addItem(ItemInterface $item)
    {
        if ($this->hasItem($item->getId()) === true) {
            throw new \RuntimeException(sprintf('A previous item exists with the same id: "%s".', $item->getId()));
        }

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

        return $this;
    }
1183231
public function add($item)
    {
        foreach ($this->_requiredInterfaces as $interface) {
            if (!$item instanceof $interface) {
                throw new RuntimeException(
                    sprintf('Item "%s" should implement "%s" interface', get_class($item), $interface)
                );
            }
        }
        
        $this->_items[spl_object_hash($item)] = $item;
        return $this;
    }
335075
public function addItem(PricedItemInterface $item)
    {
        if ($this->hasItem($item)) {
            return $this;
        }

        foreach ($this->items as $existingItem) {
            if ($item->equals($existingItem)) {
                $existingItem->merge($item, false);

                $this->itemsTotal = null;
                $this->total = null;

                return $this;
            }
        }

        $item->setContainer($this);
        $this->items->add($item);

        $this->itemsTotal = null;
        $this->total = null;

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