From 490b21621f2144f0f2315a4f524a13f272f061e4 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 23 Sep 2023 10:12:55 +1200 Subject: [PATCH] Remove unused variables from custom smarty functions --- CRM/Core/Smarty/plugins/prefilter.htxtFilter.php | 3 +-- .../Smarty/plugins/prefilter.resetExtScope.php | 6 +++--- CRM/Core/Smarty/resources/String.php | 15 ++++----------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CRM/Core/Smarty/plugins/prefilter.htxtFilter.php b/CRM/Core/Smarty/plugins/prefilter.htxtFilter.php index c731f68c6e..37ad98fe98 100644 --- a/CRM/Core/Smarty/plugins/prefilter.htxtFilter.php +++ b/CRM/Core/Smarty/plugins/prefilter.htxtFilter.php @@ -6,10 +6,9 @@ * evaluate unassigned variables. * * @param string $tpl_source - * @param $smarty * @return string */ -function smarty_prefilter_htxtFilter($tpl_source, &$smarty) { +function smarty_prefilter_htxtFilter($tpl_source) { if (strpos($tpl_source, '{htxt') === FALSE) { return $tpl_source; } diff --git a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php index c9c35ec466..5f87362382 100644 --- a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php +++ b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php @@ -3,11 +3,11 @@ /** * Wrap every Smarty template in a {crmScope} tag that sets the * variable "extensionKey" to blank. - * @param $tpl_source - * @param $smarty + * @param string $tpl_source + * * @return string */ -function smarty_prefilter_resetExtScope($tpl_source, &$smarty) { +function smarty_prefilter_resetExtScope($tpl_source) { return '{crmScope extensionKey=""}' . $tpl_source . '{/crmScope}'; diff --git a/CRM/Core/Smarty/resources/String.php b/CRM/Core/Smarty/resources/String.php index b533b44c78..deb316a3bc 100644 --- a/CRM/Core/Smarty/resources/String.php +++ b/CRM/Core/Smarty/resources/String.php @@ -15,11 +15,10 @@ * @copyright CiviCRM LLC https://civicrm.org/licensing * @param $tpl_name * @param $tpl_source - * @param $smarty_obj * * @return bool */ -function civicrm_smarty_resource_string_get_template($tpl_name, &$tpl_source, &$smarty_obj) { +function civicrm_smarty_resource_string_get_template($tpl_name, &$tpl_source) { $tpl_source = $tpl_name; return TRUE; } @@ -27,30 +26,24 @@ function civicrm_smarty_resource_string_get_template($tpl_name, &$tpl_source, &$ /** * @param string $tpl_name * @param $tpl_timestamp - * @param CRM_Core_Smarty $smarty_obj * * @return bool */ -function civicrm_smarty_resource_string_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj) { +function civicrm_smarty_resource_string_get_timestamp($tpl_name, &$tpl_timestamp) { $tpl_timestamp = time(); return TRUE; } /** - * @param string $tpl_name - * @param CRM_Core_Smarty $smarty_obj - * * @return bool */ -function civicrm_smarty_resource_string_get_secure($tpl_name, &$smarty_obj) { +function civicrm_smarty_resource_string_get_secure() { return TRUE; } /** - * @param string $tpl_name - * @param CRM_Core_Smarty $smarty_obj */ -function civicrm_smarty_resource_string_get_trusted($tpl_name, &$smarty_obj) { +function civicrm_smarty_resource_string_get_trusted() { } -- 2.25.1