aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-05-30 14:45:17 +0200
committerJoas Schilling <coding@schilljs.com>2023-05-31 15:42:15 +0200
commit4809e8d9a9a9658c57b0cd9488290ddd172f9831 (patch)
tree93b850d5b3e4cd4f589cdcb7448570e0d3383a73 /apps/provisioning_api
parent6f9ba4e60e088b450ee36f02af89576663b7c9db (diff)
downloadnextcloud-server-4809e8d9a9a9658c57b0cd9488290ddd172f9831.tar.gz
nextcloud-server-4809e8d9a9a9658c57b0cd9488290ddd172f9831.zip
fix(CI): Satisfy psalm by removing a now obsolete type check
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php5
1 files changed, 2 insertions, 3 deletions
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;
}