Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid74 committed May 23, 2024
1 parent 0b5e376 commit 72a5a08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhoneHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ private static function getCountryCodeFromPhoneNumber(string $phoneNumber): ?str
foreach ($country as $subCode => $prefixes) {
foreach ($prefixes as $prefix) {
if (\str_starts_with($phoneNumber, '+' . $code . $prefix)) {
return $code;
return (string) $code;
}
}
}
} else {
if (\str_starts_with($phoneNumber, '+' . $code)) {
return $code;
return (string) $code;
}
}
}
Expand Down

0 comments on commit 72a5a08

Please sign in to comment.