Code Duplication    Length = 5-6 lines in 2 locations

lib/contact.php 2 locations

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