Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark methods which are only used statically as static #22844

Merged
merged 1 commit into from
Feb 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ public function getTemplateFileName() {
* @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'])
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Task/LabelCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static function getTokenData(&$contacts) {
*
* @return array
*/
public function mergeSameHousehold(&$rows) {
public static function mergeSameHousehold(&$rows) {
// group selected contacts by type
$individuals = [];
$households = [];
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/BAO/UFField.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public static function checkSearchableORInSelector($profileID) {
*
* @param int $profileID
*/
public function resetInSelectorANDSearchable($profileID) {
public static function resetInSelectorANDSearchable($profileID) {
if (!$profileID) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/BAO/UFGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2718,7 +2718,7 @@ public static function commonSendMail($contactID, &$values) {
*
* @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 = [];
Expand Down
2 changes: 1 addition & 1 deletion CRM/Event/Form/ManageEvent/Registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function buildRegistrationBlock(&$form) {
* @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)');
Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/Mail/Incoming.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public static function formatMailDeliveryStatus($part) {
*
* @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)]);
}
Expand Down