. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; /** * The individual's sex Male? */ class CensusColumnSexM 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() === 'M') { return static::X; } return ''; } }