Code Duplication    Length = 3-3 lines in 2 locations

mod/tasks/lib/tasks.php 2 locations

@@ 162-164 (lines=3) @@
159
		$entities_options['owner_guid'] = $friendguids;
160
	}
161
162
	if(!empty($options['start_date'])) {
163
		$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_date', 'value' => $options['start_date'], 'operand' => '>=');
164
	}
165
	
166
	if(!empty($options['end_date'])) {
167
		$entities_options['metadata_name_value_pairs'][] = array('name' => 'end_date', 'value' => $options['end_date'], 'operand' => '<=');
@@ 166-168 (lines=3) @@
163
		$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_date', 'value' => $options['start_date'], 'operand' => '>=');
164
	}
165
	
166
	if(!empty($options['end_date'])) {
167
		$entities_options['metadata_name_value_pairs'][] = array('name' => 'end_date', 'value' => $options['end_date'], 'operand' => '<=');
168
	}
169
170
	$tasks = elgg_get_entities_from_metadata($entities_options);
171
	$result = array();