Mark methods which are only used statically as static
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 27 Feb 2022 10:22:11 +0000 (10:22 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 27 Feb 2022 10:22:11 +0000 (10:22 +0000)
CRM/Contact/Form/Contact.php
CRM/Contact/Form/Task/LabelCommon.php
CRM/Core/BAO/UFField.php
CRM/Core/BAO/UFGroup.php
CRM/Event/Form/ManageEvent/Registration.php
CRM/Utils/Mail/Incoming.php

index 090aafaa4fd97e6f6c4032eedbff6ab8bbcae201..47330cf50e07a5f849fcbe7d12e54ca0e1516062 100644 (file)
@@ -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'])
index c71be6f54db72dc2247ba7c2c766135fbba393bb..8a78005415dde94a1ecc86f1a669b407dff1f183 100644 (file)
@@ -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 = [];
index 443b516eadf4775ce0c645b73e1c75e29bf00d10..0bc9d2c2e237d45f8384b522bf03eeb6ad9875ba 100644 (file)
@@ -709,7 +709,7 @@ SELECT  id
    *
    * @param int $profileID
    */
-  public function resetInSelectorANDSearchable($profileID) {
+  public static function resetInSelectorANDSearchable($profileID) {
     if (!$profileID) {
       return;
     }
index 5464ecbdc16b2afbbf31a6073d8dc75f410518af..273d547367b8508307e52ff49aa0fc891fa6a069 100644 (file)
@@ -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 = [];
index f70e19f46559a9bdb1677d81dcc5fcd710079d27..ebde37ac6b4702093b40e9280065fb33edb069e8 100644 (file)
@@ -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 .= '<br />' . ts('(bottom of page)');
index 77b2c020cc94a415d6d614cc02ddf4e1cfbf708a..c53e66fe6b0a0fb395918e610f184d058d76dfe0 100644 (file)
@@ -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)]);
   }