Skip to content

Commit

Permalink
[BUGFIX] Allow array as well for method isOfType
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Jan 16, 2024
1 parent 425b704 commit a7beba5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Classes/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ public function getCountry(): string|null

/**
* Check if the phone number is of (a) given country(ies).
*
* @param array|string $country
*
* @return bool
*/
public function isOfCountry(array|string $country): bool
{
Expand All @@ -119,12 +115,9 @@ public function getType(bool $asValue = false): int|string
/**
* Check if the phone number is of (a) given type(s).
*
* @param int|string $type
*
* @return bool
* @throws libNumberParseException
*/
public function isOfType(int|string $type): bool
public function isOfType(int|string|array $type): bool
{
$types = PhoneNumberType::sanitize(Arr::wrap($type));

Expand All @@ -139,9 +132,6 @@ public function isOfType(int|string $type): bool
/**
* Format the phone number in a given format.
*
* @param string|int $format
*
* @return string
* @throws NumberFormatException
* @throws NumberParseException
* @throws libNumberParseException
Expand Down

0 comments on commit a7beba5

Please sign in to comment.