Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to timezone arrays #673

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/PhoneNumberToTimeZonesMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function getUnknownTimeZone()
* the validity of the number passed in.
*
* @param $number PhoneNumber the phone number for which we want to get the time zones to which it belongs
* @return array a list of the corresponding time zones or a single element list with the default
* @return string[] a list of the corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found or if the number was invalid
*/
public function getTimeZonesForNumber(PhoneNumber $number)
Expand All @@ -103,7 +103,7 @@ public function getTimeZonesForNumber(PhoneNumber $number)
* Returns the list of time zones corresponding to the country calling code of {@code number}.
*
* @param $number PhoneNumber the phone number to look up
* @return array the list of corresponding time zones or a single element list with the default
* @return string[] the list of corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found
*/
protected function getCountryLevelTimeZonesforNumber(PhoneNumber $number)
Expand All @@ -120,7 +120,7 @@ protected function getCountryLevelTimeZonesforNumber(PhoneNumber $number)
* for geo-localization.
*
* @param $number PhoneNumber a valid phone number for which we want to get the time zones to which it belongs
* @return array a list of the corresponding time zones or a single element list with the default
* @return string[] a list of the corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found or if the number was invalid
*/
public function getTimeZonesForGeographicalNumber(PhoneNumber $number)
Expand All @@ -132,7 +132,7 @@ public function getTimeZonesForGeographicalNumber(PhoneNumber $number)
* Returns a list of time zones to which a geocodable phone number belongs.
*
* @param PhoneNumber $number The phone number for which we want to get the time zones to which it belongs
* @return array the list of correspondiing time zones or a single element list with the default
* @return string[] the list of corresponding time zones or a single element list with the default
* unknown timezone if no other time zone was found or if the number was invalid
*/
protected function getTimeZonesForGeocodableNumber(PhoneNumber $number)
Expand Down
8 changes: 4 additions & 4 deletions src/prefixmapper/PrefixTimeZonesMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct($map)
* instead of a long.
*
* @param $number PhoneNumber the phone number to look up
* @return array the list of corresponding time zones
* @return string[] the list of corresponding time zones
*/
public function lookupTimeZonesForNumber(PhoneNumber $number)
{
Expand All @@ -45,7 +45,7 @@ public function lookupTimeZonesForNumber(PhoneNumber $number)
* input. Also, any of its prefixes, such as 16502, is also valid.
*
* @param $key int the key to look up
* @return array the list of corresponding time zones
* @return string[] the list of corresponding time zones
*/
protected function lookupTimeZonesForNumberKey($key)
{
Expand All @@ -64,7 +64,7 @@ protected function lookupTimeZonesForNumberKey($key)
* Split {@code timezonesString} into all the time zones that are part of it.
*
* @param $timezonesString String
* @return array
* @return string[]
*/
protected function tokenizeRawOutputString($timezonesString)
{
Expand All @@ -75,7 +75,7 @@ protected function tokenizeRawOutputString($timezonesString)
* Returns the list of time zones {@code number}'s calling country code corresponds to.
*
* @param $number PhoneNumber the phone number to look up
* @return array the list of corresponding time zones
* @return string[] the list of corresponding time zones
*/
public function lookupCountryLevelTimeZonesForNumber(PhoneNumber $number)
{
Expand Down
Loading