Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 557-564 (lines=8) @@
554
	
555
		// can't use helper function with type_subtype_pair because
556
		// it's already an array...just need to merge it
557
		if (isset($options['type_subtype_pair'])) {
558
			if (isset($options['type_subtype_pairs'])) {
559
				$options['type_subtype_pairs'] = array_merge($options['type_subtype_pairs'],
560
					$options['type_subtype_pair']);
561
			} else {
562
				$options['type_subtype_pairs'] = $options['type_subtype_pair'];
563
			}
564
		}
565
566
		$singulars = ['type', 'subtype', 'guid', 'owner_guid', 'container_guid'];
567
		$options = _elgg_normalize_plural_options_array($options, $singulars);

engine/lib/metastrings.php 1 location

@@ 127-134 (lines=8) @@
124
125
	// can't use helper function with type_subtype_pair because
126
	// it's already an array...just need to merge it
127
	if (isset($options['type_subtype_pair'])) {
128
		if (isset($options['type_subtype_pairs'])) {
129
			$options['type_subtype_pairs'] = array_merge($options['type_subtype_pairs'],
130
				$options['type_subtype_pair']);
131
		} else {
132
			$options['type_subtype_pairs'] = $options['type_subtype_pair'];
133
		}
134
	}
135
136
	$singulars = [
137
		'type', 'subtype', 'type_subtype_pair',