Skip to content

Commit

Permalink
Merge pull request #34 from ranpro/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored May 26, 2023
2 parents 27da0c9 + 549e6fe commit bbcfe91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ protected function listObjects(string $directory = '', bool $recursive = false)

protected function normalizeVisibility(string $visibility): string
{
return $visibility === Visibility::PUBLIC ? 'public-read' : 'default';
return match ($visibility) {
Visibility::PUBLIC => 'public-read',
Visibility::PRIVATE => 'private',
default => 'default',
};
}
}

0 comments on commit bbcfe91

Please sign in to comment.