diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-11-06 18:04:41 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-11-06 18:29:40 +0000 |
| commit | ef475b14d08542378dc3f165515f9182552984ef (patch) | |
| tree | f090477be532108cca20582cfa8baee9b2db6f4a /app/SurnameTradition/PortugueseSurnameTradition.php | |
| parent | f934075922fa819544d437a7c258b0c884f11178 (diff) | |
| download | webtrees-ef475b14d08542378dc3f165515f9182552984ef.tar.gz webtrees-ef475b14d08542378dc3f165515f9182552984ef.tar.bz2 webtrees-ef475b14d08542378dc3f165515f9182552984ef.zip | |
Strict types
Diffstat (limited to 'app/SurnameTradition/PortugueseSurnameTradition.php')
| -rw-r--r-- | app/SurnameTradition/PortugueseSurnameTradition.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/SurnameTradition/PortugueseSurnameTradition.php b/app/SurnameTradition/PortugueseSurnameTradition.php index 937d4d5ea9..bb962d1a69 100644 --- a/app/SurnameTradition/PortugueseSurnameTradition.php +++ b/app/SurnameTradition/PortugueseSurnameTradition.php @@ -74,13 +74,13 @@ class PortugueseSurnameTradition extends DefaultSurnameTradition */ public function newChildNames(?Individual $father, ?Individual $mother, string $sex): array { - if (preg_match(self::REGEX_SURNS, $this->extractName($father), $match_father)) { + if (preg_match(self::REGEX_SURNS, $this->extractName($father), $match_father) === 1) { $father_surname = $match_father['SURN2']; } else { $father_surname = ''; } - if (preg_match(self::REGEX_SURNS, $this->extractName($mother), $match_mother)) { + if (preg_match(self::REGEX_SURNS, $this->extractName($mother), $match_mother) === 1) { $mother_surname = $match_mother['SURN2']; } else { $mother_surname = ''; @@ -104,7 +104,7 @@ class PortugueseSurnameTradition extends DefaultSurnameTradition */ public function newParentNames(Individual $child, string $sex): array { - if (preg_match(self::REGEX_SURNS, $this->extractName($child), $match)) { + if (preg_match(self::REGEX_SURNS, $this->extractName($child), $match) === 1) { switch ($sex) { case 'M': return [ |
