X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FVerp.php;h=a9d5140c3cdd7f0c216c144f801377d845137cfe;hb=b832662c49a7a966444dfdd69c6c9b5cae9cc2f1;hp=56c4d51dba7a4add84d0a9902ca0feb59f7856cf;hpb=daa46b94db74b842b7d7c6be293401672b637e7f;p=civicrm-core.git diff --git a/CRM/Utils/Verp.php b/CRM/Utils/Verp.php index 56c4d51dba..a9d5140c3c 100644 --- a/CRM/Utils/Verp.php +++ b/CRM/Utils/Verp.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -30,12 +30,14 @@ * headers. * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @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"]; } }