diff --git a/src/ObfuscateMail.php b/src/ObfuscateMail.php
index 3442bee..fc2fa06 100644
--- a/src/ObfuscateMail.php
+++ b/src/ObfuscateMail.php
@@ -37,7 +37,7 @@ class ObfuscateMail implements ObfuscateMailInterface {
   /**
    * {@inheritdoc}
    */
-  public function getObfuscatedLink($email, $text = '', $extra = []) {
+  public function getObfuscatedLink(string $email, string $text = '', array $extra = []): array {
     return $this->obfuscateMailMethod->getObfuscatedLink($email, $text, $extra);
   }
 
diff --git a/src/ObfuscateMailHtmlEntity.php b/src/ObfuscateMailHtmlEntity.php
index fac528f..ecf4c39 100644
--- a/src/ObfuscateMailHtmlEntity.php
+++ b/src/ObfuscateMailHtmlEntity.php
@@ -14,11 +14,11 @@ class ObfuscateMailHtmlEntity implements ObfuscateMailInterface {
   /**
    * {@inheritdoc}
    */
-  public function getObfuscatedLink($email, $text = '', $extra = []) {
+  public function getObfuscatedLink(string $email, string $text = '', array $extra = []): array {
 
     // Tell search engines to ignore obfuscated uri.
     if (!isset($extra['rel'])) {
-      $params['rel'] = 'nofollow';
+      $extra['rel'] = 'nofollow';
     }
 
     $neverEncode = [
@@ -42,6 +42,10 @@ class ObfuscateMailHtmlEntity implements ObfuscateMailInterface {
       }
     }
 
+    if (!empty($extra['query'])) {
+      $urlEncodedEmail .= '?' . $extra['query'];
+      unset($extra['query']);
+    }
     $obfuscatedEmailUrl = $this->obfuscateEmail('mailto:' . $urlEncodedEmail);
     if (!empty($text)) {
       $innerHtml = $this->obfuscateEmail($text);
diff --git a/src/ObfuscateMailInterface.php b/src/ObfuscateMailInterface.php
index 23c56d3..e88a1b8 100644
--- a/src/ObfuscateMailInterface.php
+++ b/src/ObfuscateMailInterface.php
@@ -22,15 +22,15 @@ interface ObfuscateMailInterface {
    *
    * @param string $email
    *   Email address.
-   * @param array $params
-   *   Optional parameters to be used by the a tag.
    * @param string $text
-   *   Optional text for the a tag innerHtml.
+   *   Optional text for the <a> tag innerHtml.
+   * @param array $extra
+   *   Optional parameters to be used by the <a> tag.
    *
    * @return array
    *   Obfuscated email link render array.
    */
-  public function getObfuscatedLink($email, array $params = [], $text = '');
+  public function getObfuscatedLink(string $email, string $text = '', array $extra = []): array;
 
   /**
    * Obfuscates an email address.
diff --git a/src/ObfuscateMailROT13.php b/src/ObfuscateMailROT13.php
index eb8e78d..1234052 100644
--- a/src/ObfuscateMailROT13.php
+++ b/src/ObfuscateMailROT13.php
@@ -20,12 +20,11 @@ class ObfuscateMailROT13 implements ObfuscateMailInterface {
   /**
    * {@inheritdoc}
    */
-  public function getObfuscatedLink($email, $text = '', $extra = []) {
-    $build = [
+  public function getObfuscatedLink(string $email, string $text = '', array $extra = []): array {
+    return [
       '#theme' => 'email_rot13_link',
       '#link' => $this->obfuscateEmail($email, $text, $extra),
     ];
-    return $build;
   }
 
   /**
diff --git a/src/Plugin/Field/FieldFormatter/ObfuscateFieldFormatter.php b/src/Plugin/Field/FieldFormatter/ObfuscateFieldFormatter.php
index 6c4e480..0efdf93 100644
--- a/src/Plugin/Field/FieldFormatter/ObfuscateFieldFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/ObfuscateFieldFormatter.php
@@ -98,7 +98,7 @@ class ObfuscateFieldFormatter extends FormatterBase {
     foreach ($items as $delta => $item) {
       // @TODO Use process here. Need to consider the linkLabel.
       //$elements[$delta] = $this->process($item->value);
-      $elements[$delta] = $obfuscateMail->getObfuscatedLink($item->value, [], $linkLabel);
+      $elements[$delta] = $obfuscateMail->getObfuscatedLink($item->value, $linkLabel);
     }
     return $elements;
   }
diff --git a/src/TwigExtension.php b/src/TwigExtension.php
index 43b48f4..4f84c4a 100644
--- a/src/TwigExtension.php
+++ b/src/TwigExtension.php
@@ -87,8 +87,8 @@ class TwigExtension extends AbstractExtension {
    * @return array
    *   The text and email obfuscated as a link.
    */
-  public function obfuscate($mail, $text) {
-    return $this->obfuscateMail->getObfuscatedLink($mail, [], $text);
+  public function obfuscate(string $mail, string $text): array {
+    return $this->obfuscateMail->getObfuscatedLink($mail, $text);
   }
 
 }
