projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #14861 from eileenmcnaughton/anet
[civicrm-core.git]
/
CRM
/
Utils
/
Verp.php
diff --git
a/CRM/Utils/Verp.php
b/CRM/Utils/Verp.php
index 529008f442d61f0af7939e7d6161faf7e5211d70..a9d5140c3cdd7f0c216c144f801377d845137cfe 100644
(file)
--- a/
CRM/Utils/Verp.php
+++ b/
CRM/Utils/Verp.php
@@
-33,9
+33,11
@@
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Utils_Verp {
* @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',
'+' => '2B',
'@' => '40',
':' => '3A',
@@
-44,11
+46,13
@@
class CRM_Utils_Verp {
'-' => '2D',
'[' => '5B',
']' => '5D',
'-' => '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' => '%',
'40' => '@',
'3A' => ':',
'25' => '%',
@@
-57,7
+61,7
@@
class CRM_Utils_Verp {
'5B' => '[',
'5D' => ']',
'2B' => '+',
'5B' => '[',
'5D' => ']',
'2B' => '+',
-
)
;
+
]
;
/**
* Encode the sender's address with the VERPed recipient.
/**
* Encode the sender's address with the VERPed recipient.
@@
-109,7
+113,7
@@
class CRM_Utils_Verp {
$rdomain = preg_replace("/+$code/i", $char, $rdomain);
}
$rdomain = preg_replace("/+$code/i", $char, $rdomain);
}
- return
array("$slocal@$sdomain", "$rlocal@$rdomain")
;
+ return
["$slocal@$sdomain", "$rlocal@$rdomain"]
;
}
}
}
}