Code Duplication    Length = 11-12 lines in 2 locations

engine/classes/Elgg/Database/Annotations.php 1 location

@@ 205-215 (lines=11) @@
202
	 *
203
	 * @return \ElggAnnotation[]|mixed
204
	 */
205
	function find(array $options = array()) {
206
207
		// support shortcut of 'count' => true for 'annotation_calculation' => 'count'
208
		if (isset($options['count']) && $options['count']) {
209
			$options['annotation_calculation'] = 'count';
210
			unset($options['count']);
211
		}
212
		
213
		$options['metastring_type'] = 'annotations';
214
		return _elgg_get_metastring_based_objects($options);
215
	}
216
	
217
	/**
218
	 * Deletes annotations based on $options.

engine/classes/Elgg/Database/MetadataTable.php 1 location

@@ 319-330 (lines=12) @@
316
	 *
317
	 * @return \ElggMetadata[]|mixed
318
	 */
319
	function getAll(array $options = array()) {
320
	
321
		// @todo remove support for count shortcut - see #4393
322
		// support shortcut of 'count' => true for 'metadata_calculation' => 'count'
323
		if (isset($options['count']) && $options['count']) {
324
			$options['metadata_calculation'] = 'count';
325
			unset($options['count']);
326
		}
327
	
328
		$options['metastring_type'] = 'metadata';
329
		return _elgg_get_metastring_based_objects($options);
330
	}
331
	
332
	/**
333
	 * Deletes metadata based on $options.