Skip to content

Commit

Permalink
Fix string parameter type hinted as integer
Browse files Browse the repository at this point in the history
extractPossibleNumber in PhoneNumberUtil.php wants a string for the $number parameter as also stated in the method's documention (since a string with special charactars like '-' cannot be an integer), but was type hinted as an integer causing PHP stan errors.
  • Loading branch information
Finidi-Schoonhoven authored Jan 8, 2024
1 parent 033bea9 commit 8d9277e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ protected function buildNationalNumberForParsing($numberToParse, &$nationalNumbe
* (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second extension so that the first
* number is parsed correctly.
*
* @param int $number the string that might contain a phone number
* @param string $number the string that might contain a phone number
* @return string the number, stripped of any non-phone-number prefix (such as "Tel:") or an empty
* string if no character used to start phone numbers (such as + or any digit) is
* found in the number
Expand Down

0 comments on commit 8d9277e

Please sign in to comment.