Code Duplication    Length = 5-6 lines in 2 locations

lib/contact.php 2 locations

@@ 473-478 (lines=6) @@
470
	public function getPropertyIndexByChecksum($checksum) {
471
		$this->retrieve();
472
		$idx = 0;
473
		foreach ($this->children as $i => &$property) {
474
			if (substr(md5($property->serialize()), 0, 8) == $checksum ) {
475
				return $idx;
476
			}
477
			$idx += 1;
478
		}
479
		throw new Exception(self::$l10n->t('Property not found'), 404);
480
	}
481
@@ 491-495 (lines=5) @@
488
	*/
489
	public function getPropertyByChecksum($checksum) {
490
		$this->retrieve();
491
		foreach ($this->children as $i => &$property) {
492
			if (substr(md5($property->serialize()), 0, 8) == $checksum ) {
493
				return $property;
494
			}
495
		}
496
		throw new Exception(self::$l10n->t('Property not found'), 404);
497
	}
498