public function normalize($item, $format = null, array $context = [])
    {
        $data = [];

        if ($this->contextHasGroup('Summary', $context)) {
            $saleItem = $item->getSaleItem();

            $data = array_replace($data, [
                'designation'      => $saleItem->getDesignation(),
                'reference'        => $saleItem->getReference(),
                'quantity'         => $item->getQuantity(),
                'total'            => $saleItem->getTotalQuantity(),
            ]);
        }

        return $data;
    }
public function normalize($item, $format = null, array $context = [])
    {
        $data = [];

        if ($this->contextHasGroup('Summary', $context)) {
            $saleItem = $item->getSaleItem();

            $data = array_replace($data, [
                'designation'      => $saleItem->getDesignation(),
                'reference'        => $saleItem->getReference(),
                'quantity'         => $item->getQuantity(),
                'total'            => $saleItem->getTotalQuantity(),
            ]);
        }

        return $data;
    }
@inheritdoc

@param ShipmentItemInterface $item