Bridge/Symfony/Validator/Constraints/InvoiceLineValidator.php
private function findMatchingShipmentItem(InvoiceLineInterface $line, ShipmentInterface $shipment)
    {
        $saleItem = $line->getSaleItem();

        foreach ($shipment->getItems() as $shipmentItem) {
            if ($saleItem === $shipmentItem->getSaleItem()) {
                return $shipmentItem;
            }
        }

        return null;
    }
private function findMatchingShipmentItem(InvoiceLineInterface $line, ShipmentInterface $shipment)
    {
        $saleItem = $line->getSaleItem();

        foreach ($shipment->getItems() as $shipmentItem) {
            if ($saleItem === $shipmentItem->getSaleItem()) {
                return $shipmentItem;
            }
        }

        return null;
    }
Finds the shipment item matching the invoice line.

@param InvoiceLineInterface $line
@param ShipmentInterface    $shipment

@return \Ekyna\Component\Commerce\Shipment\Model\ShipmentItemInterface|null