src/Webtrees/Family.php
public function getSpouseById(\Fisharebest\Webtrees\Individual $person) {
		if ($this->gedcomrecord->getWife() && 
				$person->getXref() === $this->gedcomrecord->getWife()->getXref()) {
			return $this->gedcomrecord->getHusband();
		} else {
			return $this->gedcomrecord->getWife();
		}
	}
public function getSpouseById(\Fisharebest\Webtrees\Individual $person) {
		if ($this->gedcomrecord->getWife() && 
				$person->getXref() === $this->gedcomrecord->getWife()->getXref()) {
			return $this->gedcomrecord->getHusband();
		} else {
			return $this->gedcomrecord->getWife();
		}
	}
public function getSpouseById ( \ Fisharebest \ Webtrees \ Individual $ person ) { if ( $ this -> gedcomrecord -> getWife ( ) && $ person -> getXref ( ) === $ this -> gedcomrecord -> getWife ( ) -> getXref ( ) ) { return $ this -> gedcomrecord -> getHusband ( ) ; } else { return $ this -> gedcomrecord -> getWife ( ) ; } }
Find the spouse of a person, using the Xref comparison.

@param Individual $person

@return Individual|null
Find the spouse of a person using the Xref comparison .