[Ref] remove never-passed param
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 31 May 2021 23:50:42 +0000 (11:50 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 1 Jun 2021 01:24:57 +0000 (13:24 +1200)
Removes a parameter that is never passed in

CRM/Contact/BAO/GroupContactCache.php

index e7bed41265609d6b2ddbcc0cfe8293eef34c0c06..789435e02e2adeef84c73360e39460dc5287d1b0 100644 (file)
@@ -99,18 +99,15 @@ AND (
    *
    * @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);
   }
 
   /**