Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 219-229 (lines=11) @@
216
	 *
217
	 * @return \ElggAnnotation[]|mixed
218
	 */
219
	function find(array $options = []) {
220
221
		// support shortcut of 'count' => true for 'annotation_calculation' => 'count'
222
		if (isset($options['count']) && $options['count']) {
223
			$options['annotation_calculation'] = 'count';
224
			unset($options['count']);
225
		}
226
		
227
		$options['metastring_type'] = 'annotations';
228
		return _elgg_get_metastring_based_objects($options);
229
	}
230
	
231
	/**
232
	 * Deletes annotations based on $options.

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

@@ 333-344 (lines=12) @@
330
	 *
331
	 * @return \ElggMetadata[]|mixed
332
	 */
333
	function getAll(array $options = []) {
334
	
335
		// @todo remove support for count shortcut - see #4393
336
		// support shortcut of 'count' => true for 'metadata_calculation' => 'count'
337
		if (isset($options['count']) && $options['count']) {
338
			$options['metadata_calculation'] = 'count';
339
			unset($options['count']);
340
		}
341
	
342
		$options['metastring_type'] = 'metadata';
343
		return _elgg_get_metastring_based_objects($options);
344
	}
345
	
346
	/**
347
	 * Deletes metadata based on $options.