Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 486-495 (lines=10) @@
483
484
		// populate entity and metadata caches, and prepare $entities for preloader
485
		$guids = array();
486
		foreach ($results as $item) {
487
			// A custom callback could result in items that aren't \ElggEntity's, so check for them
488
			if ($item instanceof \ElggEntity) {
489
				_elgg_cache_entity($item);
490
				// plugins usually have only settings
491
				if (!$item instanceof \ElggPlugin) {
492
					$guids[] = $item->guid;
493
				}
494
			}
495
		}
496
		// @todo Without this, recursive delete fails. See #4568
497
		reset($results);
498

mod/elgg_solr/lib/functions.php 1 location

@@ 1545-1554 (lines=10) @@
1542
		if ($dt) {
1543
			// populate entity and metadata caches
1544
			$guids = array();
1545
			foreach ($dt as $item) {
1546
				// A custom callback could result in items that aren't ElggEntity's, so check for them
1547
				if ($item instanceof ElggEntity) {
1548
					_elgg_cache_entity($item);
1549
					// plugins usually have only settings
1550
					if (!$item instanceof ElggPlugin) {
1551
						$guids[] = $item->guid;
1552
					}
1553
				}
1554
			}
1555
			// @todo Without this, recursive delete fails. See #4568
1556
			reset($dt);
1557