/** * Formats the contact details * * @param ClientContactDetailsInterface $details * @param string $lineSeparator * * @return string */ public function formatContactDetails(ClientContactDetailsInterface $details, $lineSeparator = self::LINES_SEPARATOR) { $lines = []; $lines[] = sprintf('%s %s', $details->getFirstName(), $details->getLastName()); $lines[] = sprintf('%s %s', $details->getPhone(), $details->getSecondaryPhone()); $lines[] = $details->getEmail(); return implode($lineSeparator, $lines); }
/** * @inheritDoc */ public function setUsername($username) { $this->username = (string) $username; $this->contactDetails->setEmail((string) $username); }