From e39893f5b64a2de777b6f2b091463e704dbb1dd2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 2 May 2014 15:16:06 -0700 Subject: [PATCH] comment cleanup & remove unused functions --- CRM/Utils/Token.php | 196 +++++++++++++++++++++++++++++++------------- 1 file changed, 137 insertions(+), 59 deletions(-) diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index 605405c524..7e79abe7dc 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -161,10 +161,12 @@ class CRM_Utils_Token { /** * Wrapper for token replacing * - * @param string $type The token type - * @param string $var The token variable - * @param string $value The value to substitute for the token - * @param string (reference) $str The string to replace in + * @param string $type The token type + * @param string $var The token variable + * @param string $value The value to substitute for the token + * @param string (reference) $str The string to replace in + * + * @param bool $escapeSmarty * * @return string The processed string * @access public @@ -185,7 +187,9 @@ class CRM_Utils_Token { /** * get< the regex for token replacement * - * @param string $key a string indicating the the type of token to be used in the expression + * @param $token_type + * + * @internal param string $key a string indicating the the type of token to be used in the expression * * @return string regular expression sutiable for using in preg_replace * @access private @@ -209,13 +213,15 @@ class CRM_Utils_Token { return preg_replace(array('/{/', '/(?|mixed */ public static function replaceContributionTokens($str, &$contribution, $html = FALSE, $knownTokens = NULL, $escapeSmarty = FALSE) { @@ -1463,9 +1536,11 @@ class CRM_Utils_Token { * @param string $separator * @param string $str * @param array $contribution - * @param string $html + * @param bool|string $html * @param string $knownTokens - * @param string $escapeSmarty + * @param bool|string $escapeSmarty + * + * @return \Ambigous|mixed|string|\unknown */ public static function replaceMultipleContributionTokens($separator, $str, &$contribution, $html = FALSE, $knownTokens = NULL, $escapeSmarty = FALSE) { if(empty($knownTokens['contribution'])) { @@ -1530,6 +1605,14 @@ class CRM_Utils_Token { return $value; } + /** + * @param $token + * @param $contribution + * @param bool $html + * @param bool $escapeSmarty + * + * @return mixed|string + */ public static function getContributionTokenReplacement($token, &$contribution, $html = FALSE, $escapeSmarty = FALSE) { self::_buildContributionTokens(); @@ -1563,10 +1646,6 @@ class CRM_Utils_Token { return $value; } - function getPermissionEmails($permissionName) {} - - function getRoleEmails($roleName) {} - /** * @return array: legacy_token => new_token */ @@ -1613,5 +1692,4 @@ class CRM_Utils_Token { return $output; } - } -- 2.25.1