From 4809e8d9a9a9658c57b0cd9488290ddd172f9831 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 May 2023 14:45:17 +0200 Subject: fix(CI): Satisfy psalm by removing a now obsolete type check Signed-off-by: Joas Schilling --- apps/provisioning_api/lib/Controller/UsersController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps/provisioning_api/lib') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 7dfdea991e5..6ce46087d80 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -46,7 +46,6 @@ namespace OCA\Provisioning_API\Controller; use InvalidArgumentException; use libphonenumber\NumberParseException; -use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumberFormat; use libphonenumber\PhoneNumberUtil; use OC\Authentication\Token\RemoteWipe; @@ -245,7 +244,7 @@ class UsersController extends AUserData { foreach ($phoneNumbers as $phone) { try { $phoneNumber = $phoneUtil->parse($phone, $location); - if ($phoneNumber instanceof PhoneNumber && $phoneUtil->isValidNumber($phoneNumber)) { + if ($phoneUtil->isValidNumber($phoneNumber)) { $normalizedNumber = $phoneUtil->format($phoneNumber, PhoneNumberFormat::E164); $normalizedNumberToKey[$normalizedNumber] = (string) $key; } @@ -258,7 +257,7 @@ class UsersController extends AUserData { // when it's different to the user's given region. try { $phoneNumber = $phoneUtil->parse($phone, $defaultPhoneRegion); - if ($phoneNumber instanceof PhoneNumber && $phoneUtil->isValidNumber($phoneNumber)) { + if ($phoneUtil->isValidNumber($phoneNumber)) { $normalizedNumber = $phoneUtil->format($phoneNumber, PhoneNumberFormat::E164); $normalizedNumberToKey[$normalizedNumber] = (string) $key; } -- cgit v1.2.3