From fcaa9ff815ff4ffda270940245110700e9535a30 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Tue, 24 Oct 2023 13:24:01 +0100 Subject: [PATCH] Add isset null operators --- src/Migration/Sources/Appwrite.php | 6 +++--- src/Migration/Sources/Firebase.php | 4 ++-- src/Migration/Sources/NHost.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index a79486d..1bd2462 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -326,10 +326,10 @@ private function exportUsers(int $batchSize) $this->calculateTypes($user), $user['labels'] ?? [], '', - $user['emailVerification'], - $user['phoneVerification'], + $user['emailVerification'] ?? false, + $user['phoneVerification'] ?? false, ! $user['status'], - $user['prefs'] + $user['prefs'] ?? [], ); $lastDocument = $user['$id']; diff --git a/src/Migration/Sources/Firebase.php b/src/Migration/Sources/Firebase.php index 66ff580..9e724a0 100644 --- a/src/Migration/Sources/Firebase.php +++ b/src/Migration/Sources/Firebase.php @@ -212,9 +212,9 @@ private function exportUsers(int $batchSize) $this->calculateUserType($user['providerUserInfo'] ?? []), [], '', - $user['emailVerified'], + $user['emailVerified'] ?? false, false, // Can't get phone number status on firebase :/ - $user['disabled'] + $user['disabled'] ?? false ); } diff --git a/src/Migration/Sources/NHost.php b/src/Migration/Sources/NHost.php index 754613e..33f923e 100644 --- a/src/Migration/Sources/NHost.php +++ b/src/Migration/Sources/NHost.php @@ -249,9 +249,9 @@ private function exportUsers(int $batchSize) $this->calculateUserTypes($user), [], '', - $user['email_verified'], - $user['phone_number_verified'], - $user['disabled'], + $user['email_verified'] ?? false, + $user['phone_number_verified'] ?? false, + $user['disabled'] ?? false, [] ); }