Skip to content

Commit

Permalink
Merge pull request #22 from utopia-php/feat-fix-nulls
Browse files Browse the repository at this point in the history
Add isset null operators
  • Loading branch information
christyjacob4 authored Nov 2, 2023
2 parents b3cb3ca + fcaa9ff commit f78273b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/Migration/Sources/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
4 changes: 2 additions & 2 deletions src/Migration/Sources/Firebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Migration/Sources/NHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[]
);
}
Expand Down

0 comments on commit f78273b

Please sign in to comment.