. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; /** * The individual's sex Female? */ class CensusColumnSexF extends AbstractCensusColumn implements CensusColumnInterface { protected const MALE = 'M'; protected const FEMALE = 'F'; protected const X = 'X'; /** * Generate the likely value of this census column, based on available information. * X is the value returned for this column as it is a selection of F column or M * column. * * @param Individual $individual * @param Individual $head * * @return string */ public function generate(Individual $individual, Individual $head): string { if ($individual->sex() === 'F') { return static::X; } return ''; } }