Code Duplication    Length = 11-11 lines in 2 locations

app/Query/QueryName.php 1 location

@@ 524-534 (lines=11) @@
521
	 *
522
	 * @return Family[]
523
	 */
524
	public static function families(Tree $tree, $surn, $salpha, $galpha, $marnm) {
525
		$list = [];
526
		foreach (self::individuals($tree, $surn, $salpha, $galpha, $marnm, true) as $indi) {
527
			foreach ($indi->getSpouseFamilies() as $family) {
528
				$list[$family->getXref()] = $family;
529
			}
530
		}
531
		usort($list, '\Fisharebest\Webtrees\GedcomRecord::compare');
532
533
		return $list;
534
	}
535
}
536

app/Controller/IndividualListController.php 1 location

@@ 520-530 (lines=11) @@
517
	 *
518
	 * @return Family[]
519
	 */
520
	public function families($surn, $salpha, $galpha, $marnm) {
521
		$list = [];
522
		foreach ($this->individuals($surn, $salpha, $galpha, $marnm, true) as $indi) {
523
			foreach ($indi->getSpouseFamilies() as $family) {
524
				$list[$family->getXref()] = $family;
525
			}
526
		}
527
		usort($list, '\Fisharebest\Webtrees\GedcomRecord::compare');
528
529
		return $list;
530
	}
531
532
	/**
533
	 * Some initial letters have a special meaning