diff --git a/app/Elements/MarriageType.php b/app/Elements/MarriageType.php index 81c2cedb689..916f0898522 100644 --- a/app/Elements/MarriageType.php +++ b/app/Elements/MarriageType.php @@ -28,24 +28,21 @@ */ class MarriageType extends AbstractElement { - public const VALUE_CIVIL = 'CIVIL'; - public const VALUE_PARTNERS = 'PARTNERS'; - public const VALUE_RELIGIOUS = 'RELIGIOUS'; + public const VALUE_CIVIL = 'CIVIL'; + public const VALUE_COMMON_LAW = 'COMMON LAW'; + public const VALUE_PARTNERS = 'PARTNERS'; + public const VALUE_RELIGIOUS = 'RELIGIOUS'; /** * Convert a value to a canonical form. - * GEDCOM 5.5EL uses 'RELI' and 'CIVIL' - * - * @param string $value - * - * @return string + * GEDCOM 5.5EL uses 'RELI' for 'Religious marriage' (RELIGIOUS) */ public function canonical(string $value): string { $value = strtoupper(parent::canonical($value)); $canonical = [ - 'RELI' => 'RELIGIOUS' + 'RELI' => self::VALUE_RELIGIOUS, ]; return $canonical[$value] ?? $value; @@ -59,11 +56,11 @@ public function canonical(string $value): string public function values(): array { return [ - '' => '', - self::VALUE_CIVIL => I18N::translate('Civil marriage'), - self::VALUE_PARTNERS => I18N::translate('Registered partnership'), - self::VALUE_RELIGIOUS => I18N::translate('Religious marriage'), - + '' => '', + self::VALUE_CIVIL => I18N::translate('Civil marriage'), + self::VALUE_COMMON_LAW => I18N::translate('Common-law marriage'), + self::VALUE_PARTNERS => I18N::translate('Registered partnership'), + self::VALUE_RELIGIOUS => I18N::translate('Religious marriage'), ]; } }