diff --git a/bin/MigrationCLI.php b/bin/MigrationCLI.php index 6a62490..097a34c 100644 --- a/bin/MigrationCLI.php +++ b/bin/MigrationCLI.php @@ -1,6 +1,6 @@ $resources Resources to transfer - * @param callable $callback Callback to run after transfer + * @param callable(array): void $callback to run after transfer * @param string $rootResourceId Root resource ID, If enabled you can only transfer a single root resource */ public function run( diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 4123d87..f9c38e5 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -205,7 +205,7 @@ public function report(array $resources = []): array /** * @param array $resources - * @param callable $callback + * @param callable(array): void $callback * @return void */ #[Override] @@ -789,7 +789,6 @@ protected function createIndex(Index $resource): bool if ($attributeArray === true) { $lengths[$i] = UtopiaDatabase::ARRAY_INDEX_LENGTH; - $orders[$i] = null; } } @@ -980,7 +979,7 @@ public function importFile(File $file): File [ 'bucketId' => $bucketId, 'fileId' => $file->getId(), - 'file' => new \CurlFile('data://' . $file->getMimeType() . ';base64,' . base64_encode($file->getData()), $file->getMimeType(), $file->getFileName()), + 'file' => new \CURLFile('data://' . $file->getMimeType() . ';base64,' . base64_encode($file->getData()), $file->getMimeType(), $file->getFileName()), 'permissions' => $file->getPermissions(), ] ); @@ -1003,7 +1002,7 @@ public function importFile(File $file): File [ 'bucketId' => $bucketId, 'fileId' => $file->getId(), - 'file' => new \CurlFile('data://' . $file->getMimeType() . ';base64,' . base64_encode($file->getData()), $file->getMimeType(), $file->getFileName()), + 'file' => new \CURLFile('data://' . $file->getMimeType() . ';base64,' . base64_encode($file->getData()), $file->getMimeType(), $file->getFileName()), 'permissions' => $file->getPermissions(), ] ); @@ -1142,7 +1141,7 @@ public function importPasswordUser(User $user): ?array ); break; case Hash::ALGORITHM_SHA256: - $result = $this->users->createShaUser( + $result = $this->users->createSHAUser( $user->getId(), $user->getEmail(), $hash->getHash(), @@ -1295,7 +1294,7 @@ private function importDeployment(Deployment $deployment): Resource ], [ 'functionId' => $functionId, - 'code' => new \CurlFile('data://application/gzip;base64,' . base64_encode($deployment->getData()), 'application/gzip', 'deployment.tar.gz'), + 'code' => new \CURLFile('data://application/gzip;base64,' . base64_encode($deployment->getData()), 'application/gzip', 'deployment.tar.gz'), 'activate' => $deployment->getActivated() ? 'true' : 'false', 'entrypoint' => $deployment->getEntrypoint(), ] @@ -1316,7 +1315,7 @@ private function importDeployment(Deployment $deployment): Resource ], [ 'functionId' => $functionId, - 'code' => new \CurlFile('data://application/gzip;base64,' . base64_encode($deployment->getData()), 'application/gzip', 'deployment.tar.gz'), + 'code' => new \CURLFile('data://application/gzip;base64,' . base64_encode($deployment->getData()), 'application/gzip', 'deployment.tar.gz'), 'activate' => $deployment->getActivated(), 'entrypoint' => $deployment->getEntrypoint(), ]