From 36d6d79011e6badcbb4732abaa59600145f57047 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 13 Nov 2019 20:32:41 +0100 Subject: [PATCH] Add a docblock --- src/Install/BaseUrl.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Install/BaseUrl.php b/src/Install/BaseUrl.php index d35b39904..c530f2678 100644 --- a/src/Install/BaseUrl.php +++ b/src/Install/BaseUrl.php @@ -38,6 +38,15 @@ final class BaseUrl return $this->normalized; } + /** + * Generate a valid e-mail address for this base URL's domain. + * + * This uses the given mailbox name and our already normalized host name to + * construct an email address. + * + * @param string $mailbox + * @return string + */ public function toEmail(string $mailbox): string { $host = preg_replace('/^www\./i', '', parse_url($this->normalized, PHP_URL_HOST));