Merge pull request #4768 from rohankatkar/CRM-10331Fix
[civicrm-core.git] / CRM / Contact / BAO / GroupNestingCache.php
index ff95b8e39e4e57dbfc54d02d68f07f5255e06ad0..80a2cfcaf55a2a2f6328f26d884c2f1430ae869d 100644 (file)
@@ -97,6 +97,11 @@ WHERE  id = $id
     CRM_Core_BAO_Cache::setItem($tree, 'contact groups', 'nestable tree hierarchy');
   }
 
+  /**
+   * @param $tree
+   *
+   * @return bool
+   */
   static function checkCyclicGraph(&$tree) {
     // lets keep this simple, we should probably use a graph algoritm here at some stage
 
@@ -111,6 +116,12 @@ WHERE  id = $id
     return FALSE;
   }
 
+  /**
+   * @param $tree
+   * @param int $id
+   *
+   * @return bool
+   */
   static function isCyclic(&$tree, $id) {
     $parents = $children = array();
     self::getAll($parent, $tree, $id, 'parents');
@@ -129,6 +140,12 @@ WHERE  id = $id
     return FALSE;
   }
 
+  /**
+   * @param int $id
+   * @param $groups
+   *
+   * @return array
+   */
   static function getPotentialCandidates($id, &$groups) {
     $tree = CRM_Core_BAO_Cache::getItem('contact groups', 'nestable tree hierarchy');
 
@@ -148,6 +165,12 @@ WHERE  id = $id
     return array_keys($potential);
   }
 
+  /**
+   * @param $potential
+   * @param $tree
+   * @param int $id
+   * @param $token
+   */
   static function invalidate(&$potential, &$tree, $id, $token) {
     unset($potential[$id]);
 
@@ -162,6 +185,12 @@ WHERE  id = $id
     }
   }
 
+  /**
+   * @param $all
+   * @param $tree
+   * @param int $id
+   * @param $token
+   */
   static function getAll(&$all, &$tree, $id, $token) {
     // if seen before, dont do anything
     if (isset($all[$id])) {
@@ -180,6 +209,9 @@ WHERE  id = $id
     }
   }
 
+  /**
+   * @return string
+   */
   static function json() {
     $tree = CRM_Core_BAO_Cache::getItem('contact groups', 'nestable tree hierarchy');