aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareAPIController.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-03-28 16:13:19 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-04-04 11:45:22 +0200
commit0b332ceac24ee93e82e25ee95841ae6fae3b889b (patch)
tree5c33219f115c05a17cec25e2122ff1cae352e86f /apps/files_sharing/lib/Controller/ShareAPIController.php
parent292b903bc283c5a7929e092d8262331606461ef7 (diff)
downloadnextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.tar.gz
nextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.zip
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index c9a1486db2f..4a01d97cdf0 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -134,7 +134,7 @@ class ShareAPIController extends OCSController {
IUserManager $userManager,
IRootFolder $rootFolder,
IURLGenerator $urlGenerator,
- string $userId = null,
+ ?string $userId = null,
IL10N $l10n,
IConfig $config,
IAppManager $appManager,
@@ -170,7 +170,7 @@ class ShareAPIController extends OCSController {
*
* @suppress PhanUndeclaredClassMethod
*/
- protected function formatShare(IShare $share, Node $recipientNode = null): array {
+ protected function formatShare(IShare $share, ?Node $recipientNode = null): array {
$sharedBy = $this->userManager->get($share->getSharedBy());
$shareOwner = $this->userManager->get($share->getShareOwner());
@@ -600,17 +600,17 @@ class ShareAPIController extends OCSController {
* 200: Share created
*/
public function createShare(
- string $path = null,
- int $permissions = null,
+ ?string $path = null,
+ ?int $permissions = null,
int $shareType = -1,
- string $shareWith = null,
+ ?string $shareWith = null,
string $publicUpload = 'false',
string $password = '',
- string $sendPasswordByTalk = null,
+ ?string $sendPasswordByTalk = null,
string $expireDate = '',
string $note = '',
string $label = '',
- string $attributes = null
+ ?string $attributes = null
): DataResponse {
$share = $this->shareManager->newShare();
@@ -1209,15 +1209,15 @@ class ShareAPIController extends OCSController {
*/
public function updateShare(
string $id,
- int $permissions = null,
- string $password = null,
- string $sendPasswordByTalk = null,
- string $publicUpload = null,
- string $expireDate = null,
- string $note = null,
- string $label = null,
- string $hideDownload = null,
- string $attributes = null
+ ?int $permissions = null,
+ ?string $password = null,
+ ?string $sendPasswordByTalk = null,
+ ?string $publicUpload = null,
+ ?string $expireDate = null,
+ ?string $note = null,
+ ?string $label = null,
+ ?string $hideDownload = null,
+ ?string $attributes = null
): DataResponse {
try {
$share = $this->getShareById($id);