. */ namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; /** * Marital status. */ class CensusColumnConditionEnglish extends AbstractCensusColumn implements CensusColumnInterface { /** * Generate the likely value of this census column, based on available information. * * @param Individual $individual * * @return string */ public function generate(Individual $individual) { $family = $this->spouseFamily($individual); if ($family === null || !empty($family->getFacts('_NMR'))) { return 'Unm'; // unmarried } elseif (!empty($family->getFacts('DIV'))) { return 'Div'; // divorced } else { return 'Mar'; // married } } }