Skip to content

Commit

Permalink
Small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Aug 6, 2024
1 parent c4c44d0 commit 198539d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);
Expand Down Expand Up @@ -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']],
]);

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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;
}
Expand All @@ -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']],
]);

Expand Down

0 comments on commit 198539d

Please sign in to comment.