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

[Ref] remove never-passed param #20456

Merged
merged 1 commit into from
Jun 1, 2021
Merged
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
11 changes: 4 additions & 7 deletions CRM/Contact/BAO/GroupContactCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,15 @@ public static function groupRefreshedClause($groupIDClause = NULL, $includeHidde
*
* @param int $groupID
* The group ID.
* @param bool $includeHiddenGroups
* Hidden groups are excluded by default.
*
* @return string
* the sql query which lists the groups that need to be refreshed
* @return bool
*/
public static function shouldGroupBeRefreshed($groupID, $includeHiddenGroups = FALSE) {
$query = self::groupRefreshedClause("g.id = %1", $includeHiddenGroups);
public static function shouldGroupBeRefreshed($groupID): bool {
$query = self::groupRefreshedClause('g.id = %1');
$params = [1 => [$groupID, 'Integer']];

// if the query returns the group ID, it means the group is a valid candidate for refreshing
return CRM_Core_DAO::singleValueQuery($query, $params);
return (bool) CRM_Core_DAO::singleValueQuery($query, $params);
}

/**
Expand Down