code: 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;
      }
docs: @inheritdoc
  
  @param InvoiceLineInterface $line