Code Duplication    Length = 5-5 lines in 5 locations

mod/gc_mobile_api/models/bookmark.php 2 locations

@@ 120-124 (lines=5) @@
117
			'count' => true,
118
			'distinct' => false,
119
		));
120
    if ($bookmark->container_guid != $bookmark->owner_guid){
121
      $bookmark->group_guid = $bookmark->container_guid;
122
      $bookmarkGroup = get_entity($bookmark->group_guid);
123
      $bookmark->group = gc_explode_translation($bookmarkGroup->name, $lang);
124
    }
125
  }
126
  return $bookmarks;
127
}//end get_bookmark
@@ 152-156 (lines=5) @@
149
150
    $bookmark->userDetails = get_user_block($bookmark->owner_guid, $lang); //Should go through and only pass revelant infromation
151
    $bookmark->group_guid = "";
152
    if ($bookmark->container_guid != $bookmark->owner_guid){
153
      $bookmark->group_guid = $bookmark->container_guid;
154
      $bookmarkGroup = get_entity($bookmark->group_guid);
155
      $bookmark->group = gc_explode_translation($bookmarkGroup->name, $lang);
156
    }
157
  }
158
  return $bookmarks;
159
} // end foreach_bookmark

mod/gc_mobile_api/models/doc.php 1 location

@@ 154-158 (lines=5) @@
151
		$doc->userDetails = get_user_block($doc->owner_guid, $lang);
152
		$doc->description = clean_text(gc_explode_translation($doc->description, $lang));
153
154
		if ($doc->container_guid != $doc->owner_guid){
155
			$doc->group_guid = $doc->container_guid;
156
			$docGroup = get_entity($doc->group_guid);
157
			$doc->group = gc_explode_translation($docGroup->name, $lang);
158
		  }
159
	}
160
161
	return $docs;

mod/gc_mobile_api/models/event.php 2 locations

@@ 191-195 (lines=5) @@
188
	$event->fee = $eventObj->fees;
189
	$event->eventLang = $eventObj->language;
190
	$event->location = $eventObj->venue;
191
	if ($eventObj->group_guid){
192
		$group = get_entity($eventObj->group_guid);
193
		$event->group = gc_explode_translation($group->name, $lang);
194
		$event->groupGUID = $eventObj->group_guid;
195
	}
196
	$event->comment_count = elgg_get_entities(array(
197
		'container_guid' => $guid,
198
		'count' => true,
@@ 275-279 (lines=5) @@
272
273
			$event->location = $eventObj->venue;
274
275
			if ($eventObj->group_guid){
276
				$group = get_entity($eventObj->group_guid);
277
				$event->group = gc_explode_translation($group->name, $lang);
278
				$event->groupGUID = $eventObj->group_guid;
279
			}
280
		}
281
	}
282
	return $events;