CRM-15849: fix translation string, comments
[civicrm-core.git] / CRM / Contact / BAO / GroupNesting.php
index 78c9816dec245d2190077fef64981ab6cc0d4f54..b065d4a1720cf4e3966c47cb43f3b3e4549d0e99 100644 (file)
@@ -24,7 +24,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -113,9 +113,9 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
       $this->valid() &&
       !$this->_alreadyStyled
     ) {
-      $styledGroup  = clone($this->_current);
+      $styledGroup = clone($this->_current);
       $nestingLevel = $this->getCurrentNestingLevel();
-      $indent       = '';
+      $indent = '';
       while ($nestingLevel--) {
         $indent .= $this->_styleIndent;
       }
@@ -197,7 +197,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    */
   public function _getNextParentlessGroup(&$group = NULL) {
     $lastParentlessGroup = $this->_lastParentlessGroup;
-    $nextGroup           = new CRM_Contact_BAO_Group();
+    $nextGroup = new CRM_Contact_BAO_Group();
     $nextGroup->order_by = 'title ' . self::$_sortOrder;
     $nextGroup->find();
     if ($group == NULL) {
@@ -262,10 +262,10 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
     }
     else {
       /* if we get here, it could be because we're out of siblings
-             * (in which case we return null) or because we're at the
-             * top level groups which do not have parents but may still
-             * have siblings, so check for that first.
-             */
+       * (in which case we return null) or because we're at the
+       * top level groups which do not have parents but may still
+       * have siblings, so check for that first.
+       */
 
       $nextGroup = $this->_getNextParentlessGroup($group);
       if ($nextGroup) {
@@ -338,7 +338,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $childID
    *   The child id of the association.
    *
-   * @return boolean
+   * @return bool
    *   True if association is found, false otherwise.
    */
   public static function isParentChild($parentID, $childID) {
@@ -358,7 +358,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $groupId
    *   The id of the group to check for child groups.
    *
-   * @return boolean
+   * @return bool
    *   True if 1 or more child groups are found, false otherwise.
    */
   public static function hasChildGroups($groupId) {
@@ -379,7 +379,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $groupId
    *   The id of the group to check for parent groups.
    *
-   * @return boolean
+   * @return bool
    *   True if 1 or more parent groups are found, false otherwise.
    */
   public static function hasParentGroups($groupId) {
@@ -401,7 +401,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $checkGroupId
    *   The group id to check if it is a parent of the $groupIds group(s).
    *
-   * @return boolean
+   * @return bool
    *   True if $checkGroupId points to a group that is a parent of one of the $groupIds groups, false otherwise.
    */
   public static function isParentGroup($groupIds, $checkGroupId) {
@@ -415,8 +415,8 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
       $parentGroupId = $dao->parent_group_id;
       if ($parentGroupId == $checkGroupId) {
         /* print "One of these: <pre>";
-                print_r($groupIds);
-                print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
+        print_r($groupIds);
+        print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
 
         return TRUE;
       }
@@ -433,7 +433,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $checkGroupId
    *   The group id to check if it is a child of the $groupIds group(s).
    *
-   * @return boolean
+   * @return bool
    *   True if $checkGroupId points to a group that is a child of one of the $groupIds groups, false otherwise.
    */
   public static function isChildGroup($groupIds, $checkGroupId) {
@@ -449,8 +449,8 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
       $childGroupId = $dao->child_group_id;
       if ($childGroupId == $checkGroupId) {
         /* print "One of these: <pre>";
-                 print_r($groupIds);
-                 print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
+        print_r($groupIds);
+        print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
 
         return TRUE;
       }
@@ -467,7 +467,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $checkGroupId
    *   The group id to check if it is an ancestor of the $groupIds group(s).
    *
-   * @return boolean
+   * @return bool
    *   True if $checkGroupId points to a group that is an ancestor of one of the $groupIds groups, false otherwise.
    */
   public static function isAncestorGroup($groupIds, $checkGroupId) {
@@ -484,8 +484,8 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
       $parentGroupId = $dao->parent_group_id;
       if ($parentGroupId == $checkGroupId) {
         /* print "One of these: <pre>";
-                print_r($groupIds);
-                print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
+        print_r($groupIds);
+        print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
 
         return TRUE;
       }
@@ -508,7 +508,7 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
    * @param $checkGroupId
    *   The group id to check if it is a descendent of the $groupIds group(s).
    *
-   * @return boolean
+   * @return bool
    *   True if $checkGroupId points to a group that is a descendent of one of the $groupIds groups, false otherwise.
    */
   public static function isDescendentGroup($groupIds, $checkGroupId) {
@@ -525,8 +525,8 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
       $childGroupId = $dao->child_group_id;
       if ($childGroupId == $checkGroupId) {
         /* print "One of these: <pre>";
-                print_r($groupIds);
-                print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
+        print_r($groupIds);
+        print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
 
         return TRUE;
       }
@@ -736,4 +736,5 @@ class CRM_Contact_BAO_GroupNesting extends CRM_Contact_DAO_GroupNesting implemen
 
     return $containingGroups;
   }
+
 }