protected function hasTrackingNumber(Shipment\ShipmentInterface $shipment)
    {
        if ($shipment->hasParcels()) {
            foreach ($shipment->getParcels() as $parcel) {
                if (empty($parcel->getTrackingNumber())) {
                    return false;
                }
            }

            return true;
        }

        return !empty($shipment->getTrackingNumber());
    }
protected function hasTrackingNumber(Shipment\ShipmentInterface $shipment)
    {
        if ($shipment->hasParcels()) {
            foreach ($shipment->getParcels() as $parcel) {
                if (empty($parcel->getTrackingNumber())) {
                    return false;
                }
            }

            return true;
        }

        return !empty($shipment->getTrackingNumber());
    }
Returns whether the shipment (or its parcels) has tracking number(s).

@param Shipment\ShipmentInterface $shipment

@return bool Whether the given shipment has label data.