From 198539d2966b3921625aedf942138edfd0d65a36 Mon Sep 17 00:00:00 2001 From: Wilco Louwerse Date: Tue, 6 Aug 2024 17:58:34 +0200 Subject: [PATCH] Small code cleanup --- lib/Service/FileService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index c9fd280f..2d70bc85 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -133,7 +133,7 @@ public function uploadFile(mixed $content, ?string $filePath = '', ?bool $update . $userInfo['currentUsername'] . '/' . trim(string: $filePath, characters: '/'); try { - $response = $this->client->request('PUT', $url, [ + $response = $this->client->request(method: 'PUT', uri: $url, options: [ 'auth' => [$userInfo['username'], $userInfo['password']], 'body' => $content ]); @@ -169,7 +169,7 @@ public function deleteFile(string $filePath): bool . $userInfo['currentUsername'] . '/' . trim(string: $filePath, characters: '/'); try { - $response = $this->client->request('DELETE', $url, [ + $response = $this->client->request(method: 'DELETE', uri: $url, options: [ 'auth' => [$userInfo['username'], $userInfo['password']], ]); @@ -202,7 +202,7 @@ public function folderExists(string $folderPath): bool . $userInfo['currentUsername'] . '/' . trim(string: $folderPath, characters: '/'); try { - $response = $this->client->request('PROPFIND', $url, [ + $response = $this->client->request(method: 'PROPFIND', uri: $url, options: [ 'auth' => [$userInfo['username'], $userInfo['password']], 'headers' => [ 'Depth' => '1', @@ -231,7 +231,7 @@ public function folderExists(string $folderPath): bool */ public function createFolder(string $folderPath): bool { - if ($this->folderExists($folderPath) === true) { + if ($this->folderExists(folderPath: $folderPath) === true) { $this->logger->info('Folder creation failed: Folder already exists'); return false; } @@ -244,7 +244,7 @@ public function createFolder(string $folderPath): bool . $userInfo['currentUsername'] . '/' . trim(string: $folderPath, characters: '/'); try { - $response = $this->client->request('MKCOL', $url, [ + $response = $this->client->request(method: 'MKCOL', uri: $url, options: [ 'auth' => [$userInfo['username'], $userInfo['password']], ]);