private function getOrderUserDefaultAddress(OrderInterface $order)
    {
        if (null === $user = $order->getUser()) {
            throw new OrderException('User is not set.');
        }
        if (null === $address = $user->getAddresses()->first()) { // TODO Default address
            throw new OrderException('Unable to find the user default address.');
        }
        return $address;
    }
private function getOrderUserDefaultAddress(OrderInterface $order)
    {
        if (null === $user = $order->getUser()) {
            throw new OrderException('User is not set.');
        }
        if (null === $address = $user->getAddresses()->first()) { // TODO Default address
            throw new OrderException('Unable to find the user default address.');
        }
        return $address;
    }
private function getOrderUserDefaultAddress ( OrderInterface $ order ) { if ( null === $ user = $ order -> getUser ( ) ) { throw new OrderException ( 'User is not set.' ) ; } if ( null === $ address = $ user -> getAddresses ( ) -> first ( ) ) { // TODO Default address throw new OrderException ( 'Unable to find the user default address.' ) ; } return $ address ; }
Returns the default address of the order's user.

@param OrderInterface $order
@return mixed
@throws OrderException
Returns the default address of the order s user .