/** * Formats the shipping address * * @param ClientShippingAddressInterface $address * @param string $lineSeparator * * @return string */ public function formatShippingAddress(ClientShippingAddressInterface $address, $lineSeparator = self::LINES_SEPARATOR) { $lines = []; $lines[] = sprintf('%s %s', $address->getFirstName(), $address->getLastName()); $lines[] = $address->getLine1(); $lines[] = $address->getLine2(); $lines[] = sprintf('%s, %s %s', $address->getCountry(), $address->getPostalCode(), $address->getCity()); return implode($lineSeparator, $lines); }