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

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

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

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

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

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

        return $data;
    }
@inheritdoc

@param InvoiceLineInterface $line