Entity/BaseOrder.php
public function setShippingMethod(ShippingMethod $shippingMethod)
    {
        $this->shippingMethod = $shippingMethod;
        foreach ($this->getShipments() as $shipment) {
            $shipment->setShippingMethod($this->getShippingMethod());
        }
        $this->calculateShippingCost();
        $this->forcePriceCalculation();

        return $this;
    }
public function setShippingMethod(ShippingMethod $shippingMethod)
    {
        $this->shippingMethod = $shippingMethod;
        foreach ($this->getShipments() as $shipment) {
            $shipment->setShippingMethod($this->getShippingMethod());
        }
        $this->calculateShippingCost();
        $this->forcePriceCalculation();

        return $this;
    }
@param mixed $shippingMethod

@return BaseOrder