Bridge/Symfony/Serializer/Normalizer/ShipmentParcelNormalizer.php
public function normalize($parcel, $format = null, array $context = [])
    {
        $data = [];

        if ($this->contextHasGroup('Summary', $context)) {
            $data = array_replace($data, [
                'weight'         => $parcel->getWeight(),
                'valorization'   => $parcel->getValorization(),
                'trackingNumber' => $parcel->getTrackingNumber(),
            ]);
        }

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

        if ($this->contextHasGroup('Summary', $context)) {
            $data = array_replace($data, [
                'weight'         => $parcel->getWeight(),
                'valorization'   => $parcel->getValorization(),
                'trackingNumber' => $parcel->getTrackingNumber(),
            ]);
        }

        return $data;
    }
@inheritdoc

@param ShipmentParcelInterface $parcel