diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-28 16:13:19 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-02 14:16:21 +0200 |
commit | ec5133b739eabc76271789504b4dbb91a534f552 (patch) | |
tree | 880b81f5ebd11b289c67e4bcdd1ecaa41aedbcb4 /apps/files_sharing/lib/Controller | |
parent | b074399a87e764f506550d64f6379738186355c6 (diff) | |
download | nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.tar.gz nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.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')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 32 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 2 |
2 files changed, 17 insertions, 17 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); diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index de601607f2c..31014ac6565 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -131,7 +131,7 @@ class ShareesAPIController extends OCSController { * * 200: Sharees search result returned */ - public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = false): DataResponse { + public function search(string $search = '', ?string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = false): DataResponse { // only search for string larger than a given threshold $threshold = $this->config->getSystemValueInt('sharing.minSearchStringLength', 0); |