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/PolishSurnameTradition.php | |
| parent | f934075922fa819544d437a7c258b0c884f11178 (diff) | |
| download | webtrees-ef475b14d08542378dc3f165515f9182552984ef.tar.gz webtrees-ef475b14d08542378dc3f165515f9182552984ef.tar.bz2 webtrees-ef475b14d08542378dc3f165515f9182552984ef.zip | |
Strict types
Diffstat (limited to 'app/SurnameTradition/PolishSurnameTradition.php')
| -rw-r--r-- | app/SurnameTradition/PolishSurnameTradition.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/SurnameTradition/PolishSurnameTradition.php b/app/SurnameTradition/PolishSurnameTradition.php index 05be7a6c74..7ebc96ee3d 100644 --- a/app/SurnameTradition/PolishSurnameTradition.php +++ b/app/SurnameTradition/PolishSurnameTradition.php @@ -79,7 +79,7 @@ class PolishSurnameTradition extends PaternalSurnameTradition */ public function newChildNames(?Individual $father, ?Individual $mother, string $sex): array { - if (preg_match(self::REGEX_SURN, $this->extractName($father), $match)) { + if (preg_match(self::REGEX_SURN, $this->extractName($father), $match) === 1) { if ($sex === 'F') { $name = $this->inflect($match['NAME'], self::INFLECT_FEMALE); } else { @@ -104,7 +104,7 @@ class PolishSurnameTradition extends PaternalSurnameTradition */ public function newParentNames(Individual $child, string $sex): array { - if ($sex === 'M' && preg_match(self::REGEX_SURN, $this->extractName($child), $match)) { + if ($sex === 'M' && preg_match(self::REGEX_SURN, $this->extractName($child), $match) === 1) { $name = $this->inflect($match['NAME'], self::INFLECT_MALE); $surn = $this->inflect($match['SURN'], self::INFLECT_MALE); @@ -126,7 +126,7 @@ class PolishSurnameTradition extends PaternalSurnameTradition */ public function newSpouseNames(Individual $spouse, string $sex): array { - if ($sex === 'F' && preg_match(self::REGEX_SURN, $this->extractName($spouse), $match)) { + if ($sex === 'F' && preg_match(self::REGEX_SURN, $this->extractName($spouse), $match) === 1) { $name = $this->inflect($match['NAME'], self::INFLECT_FEMALE); $surn = $this->inflect($match['SURN'], self::INFLECT_MALE); |
