* @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',
'-' => '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' => '%',
'5B' => '[',
'5D' => ']',
'2B' => '+',
- );
+ ];
/**
* Encode the sender's address with the VERPed recipient.
$rdomain = preg_replace("/+$code/i", $char, $rdomain);
}
- return array("$slocal@$sdomain", "$rlocal@$rdomain");
+ return ["$slocal@$sdomain", "$rlocal@$rdomain"];
}
}