Skip to content

Commit

Permalink
#5003 - add MARR:TYPE COMMON LAW
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Sep 21, 2024
1 parent c448112 commit 8d84e3d
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions app/Elements/MarriageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'),
];
}
}

0 comments on commit 8d84e3d

Please sign in to comment.