Shipment/Model/ShipmentStates.php
static public function isDone(ShipmentInterface $shipment)
    {
        if ($shipment->isReturn()) {
            if (static::STATE_RETURNED === $shipment->getState()) {
                return true;
            }
        } elseif (static::STATE_SHIPPED === $shipment->getState()) {
            return true;
        }

        return false;
    }
static public function isDone(ShipmentInterface $shipment)
    {
        if ($shipment->isReturn()) {
            if (static::STATE_RETURNED === $shipment->getState()) {
                return true;
            }
        } elseif (static::STATE_SHIPPED === $shipment->getState()) {
            return true;
        }

        return false;
    }
Returns whether the given shipment (or return) is a done.

@param ShipmentInterface $shipment

@return bool

@TODO remove
@deprecated No longer used