Code Duplication    Length = 4-7 lines in 2 locations

mod/gc_mobile_api/inc/functions.php 1 location

@@ 109-112 (lines=4) @@
106
	));
107
108
	$i = 0;
109
	foreach ($commentEntites as $comment) {
110
		$i++;
111
		$comments['comment_'.$i] = array('comment_user'=>get_userBlock($comment->getOwner()),'comment_text'=>$comment->description,'comment_date'=>date("Y-m-d H:i:s", $comment->time_created));
112
	}
113
	return $comments;
114
}
115

mod/gc_api/lib/blog.php 1 location

@@ 95-101 (lines=7) @@
92
		'order_by' => 'time_created asc'
93
		));
94
	$i = 0;
95
	foreach ($commentEntites as $comment) {
96
		$i++;
97
		$comments['comment_'.$i] = array('comment_user'=>get_userBlock($comment->getOwner()),'comment_text'=>$comment->description,'comment_date'=>date("Y-m-d H:i:s", $comment->time_created));
98
	}
99
100
	return $comments;
101
}
102
103
function get_userBlock($userid)
104
{