Skip to content

Commit

Permalink
[Ref] remove never-passed param
Browse files Browse the repository at this point in the history
Removes a parameter that is never passed in
  • Loading branch information
eileenmcnaughton committed Jun 1, 2021
1 parent 4c2c478 commit cb09fd1
Showing 1 changed file with 4 additions and 7 deletions.
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

0 comments on commit cb09fd1

Please sign in to comment.