diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/Elements/PedigreeLinkageType.php | 24 | ||||
| -rw-r--r-- | app/Relationship.php | 1 |
2 files changed, 20 insertions, 5 deletions
diff --git a/app/Elements/PedigreeLinkageType.php b/app/Elements/PedigreeLinkageType.php index 9cc13ece5b..d44380adf3 100644 --- a/app/Elements/PedigreeLinkageType.php +++ b/app/Elements/PedigreeLinkageType.php @@ -21,6 +21,8 @@ namespace Fisharebest\Webtrees\Elements; use Fisharebest\Webtrees\I18N; +use function strtoupper; + /** * PEDIGREE_LINKAGE_TYPE := {Size=5:7} * [ adopted | birth | foster | sealing ] @@ -35,11 +37,23 @@ class PedigreeLinkageType extends AbstractElement { protected const MAXIMUM_LENGTH = 7; - public const TYPE_ADOPTED = 'adopted'; - public const TYPE_BIRTH = 'birth'; - public const TYPE_FOSTER = 'foster'; - public const TYPE_SEALING = 'sealing'; - public const TYPE_RADA = 'rada'; + public const TYPE_ADOPTED = 'ADOPTED'; + public const TYPE_BIRTH = 'BIRTH'; + public const TYPE_FOSTER = 'FOSTER'; + public const TYPE_SEALING = 'SEALING'; + public const TYPE_RADA = 'RADA'; + + /** + * Convert a value to a canonical form. + * + * @param string $value + * + * @return string + */ + public function canonical(string $value): string + { + return strtoupper(parent::canonical($value)); + } /** * A list of controlled values for this element diff --git a/app/Relationship.php b/app/Relationship.php index 0e949a77e5..3ad2868a35 100644 --- a/app/Relationship.php +++ b/app/Relationship.php @@ -28,6 +28,7 @@ use function count; use function in_array; use function intdiv; use function min; +use function var_dump; /** * Class Relationship - define a relationship for a language. |
