From 59e3294d1338b3606a51be539c6f074804244c92 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 27 Feb 2022 10:22:11 +0000 Subject: [PATCH] Mark methods which are only used statically as static --- CRM/Contact/Form/Contact.php | 2 +- CRM/Contact/Form/Task/LabelCommon.php | 2 +- CRM/Core/BAO/UFField.php | 2 +- CRM/Core/BAO/UFGroup.php | 2 +- CRM/Event/Form/ManageEvent/Registration.php | 2 +- CRM/Utils/Mail/Incoming.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 090aafaa4f..47330cf50e 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -1243,7 +1243,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { * @return array * as array of success/fails for each address block */ - public function parseAddress(&$params) { + public static function parseAddress(&$params) { $parseSuccess = $parsedFields = []; if (!is_array($params['address']) || CRM_Utils_System::isNull($params['address']) diff --git a/CRM/Contact/Form/Task/LabelCommon.php b/CRM/Contact/Form/Task/LabelCommon.php index c71be6f54d..8a78005415 100644 --- a/CRM/Contact/Form/Task/LabelCommon.php +++ b/CRM/Contact/Form/Task/LabelCommon.php @@ -280,7 +280,7 @@ class CRM_Contact_Form_Task_LabelCommon { * * @return array */ - public function mergeSameHousehold(&$rows) { + public static function mergeSameHousehold(&$rows) { // group selected contacts by type $individuals = []; $households = []; diff --git a/CRM/Core/BAO/UFField.php b/CRM/Core/BAO/UFField.php index 443b516ead..0bc9d2c2e2 100644 --- a/CRM/Core/BAO/UFField.php +++ b/CRM/Core/BAO/UFField.php @@ -709,7 +709,7 @@ SELECT id * * @param int $profileID */ - public function resetInSelectorANDSearchable($profileID) { + public static function resetInSelectorANDSearchable($profileID) { if (!$profileID) { return; } diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 5464ecbdc1..273d547367 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -2718,7 +2718,7 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * * @return array */ - public function checkFieldsEmptyValues($gid, $cid, $params, $skipCheck = FALSE) { + public static function checkFieldsEmptyValues($gid, $cid, $params, $skipCheck = FALSE) { if ($gid) { if (CRM_Core_BAO_UFGroup::filterUFGroups($gid, $cid) || $skipCheck) { $values = []; diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index f70e19f465..ebde37ac6b 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -334,7 +334,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent * @param array $configs * Optional, for addProfileSelector(), defaults to using getProfileSelectorTypes(). */ - public function buildMultipleProfileBottom(&$form, $count, $prefix = '', $label = 'Include Profile', $configs = NULL) { + public static function buildMultipleProfileBottom(&$form, $count, $prefix = '', $label = 'Include Profile', $configs = NULL) { extract((is_null($configs)) ? self::getProfileSelectorTypes() : $configs); $element = $prefix . "custom_post_id_multiple[$count]"; $label .= '
' . ts('(bottom of page)'); diff --git a/CRM/Utils/Mail/Incoming.php b/CRM/Utils/Mail/Incoming.php index 77b2c020cc..c53e66fe6b 100644 --- a/CRM/Utils/Mail/Incoming.php +++ b/CRM/Utils/Mail/Incoming.php @@ -237,7 +237,7 @@ class CRM_Utils_Mail_Incoming { * * @return string */ - public function formatUnrecognisedPart($part) { + public static function formatUnrecognisedPart($part) { CRM_Core_Error::debug_log_message(ts('CRM_Utils_Mail_Incoming: Unable to handle message part of type "%1".', [1 => get_class($part)])); return ts('Unrecognised message part of type "%1".', [1 => get_class($part)]); } -- 2.25.1