X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FVerp.php;h=a9d5140c3cdd7f0c216c144f801377d845137cfe;hb=b832662c49a7a966444dfdd69c6c9b5cae9cc2f1;hp=529008f442d61f0af7939e7d6161faf7e5211d70;hpb=d9e8af2b9acdd8b6b72290a137bd95a8d3b06e73;p=civicrm-core.git diff --git a/CRM/Utils/Verp.php b/CRM/Utils/Verp.php index 529008f442..a9d5140c3c 100644 --- a/CRM/Utils/Verp.php +++ b/CRM/Utils/Verp.php @@ -33,9 +33,11 @@ * @copyright CiviCRM LLC (c) 2004-2019 */ class CRM_Utils_Verp { - /* Mapping of reserved characters to hex codes */ - - static $encodeMap = array( + /** + * Mapping of reserved characters to hex codes + * @var array + */ + public static $encodeMap = [ '+' => '2B', '@' => '40', ':' => '3A', @@ -44,11 +46,13 @@ class CRM_Utils_Verp { '-' => '2D', '[' => '5B', ']' => '5D', - ); + ]; - /* Mapping of hex codes to reserved characters */ - - static $decodeMap = array( + /** + * Mapping of hex codes to reserved characters + * @var array + */ + public static $decodeMap = [ '40' => '@', '3A' => ':', '25' => '%', @@ -57,7 +61,7 @@ class CRM_Utils_Verp { '5B' => '[', '5D' => ']', '2B' => '+', - ); + ]; /** * Encode the sender's address with the VERPed recipient. @@ -109,7 +113,7 @@ class CRM_Utils_Verp { $rdomain = preg_replace("/+$code/i", $char, $rdomain); } - return array("$slocal@$sdomain", "$rlocal@$rdomain"); + return ["$slocal@$sdomain", "$rlocal@$rdomain"]; } }