diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-01-31 09:00:10 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-02-07 15:15:17 +0100 |
commit | c54deeddf334bba2b89dfd75067a9c61b3951760 (patch) | |
tree | b554766d154d94cd6a7456519a8db1203a228016 | |
parent | 92cfa51b94746410d9e5a3e2bcfcbd3c66d58ee3 (diff) | |
download | nextcloud-server-c54deeddf334bba2b89dfd75067a9c61b3951760.tar.gz nextcloud-server-c54deeddf334bba2b89dfd75067a9c61b3951760.zip |
chore: Add return types
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareInfoController.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareInfoController.php b/apps/files_sharing/lib/Controller/ShareInfoController.php index ff5d208c1dc..0e2dd1667e1 100644 --- a/apps/files_sharing/lib/Controller/ShareInfoController.php +++ b/apps/files_sharing/lib/Controller/ShareInfoController.php @@ -59,11 +59,6 @@ class ShareInfoController extends ApiController { * @PublicPage * @NoCSRFRequired * @BruteForceProtection(action=shareinfo) - * - * @param string $t - * @param null $password - * @param null $dir - * @return JSONResponse */ public function info(string $t, ?string $password = null, ?string $dir = null, int $depth = -1): JSONResponse { try { @@ -99,18 +94,19 @@ class ShareInfoController extends ApiController { return new JSONResponse($this->parseNode($node, $permissionMask, $depth)); } - private function parseNode(Node $node, int $permissionMask, int $depth) { + private function parseNode(Node $node, int $permissionMask, int $depth): array { if ($node instanceof File) { return $this->parseFile($node, $permissionMask); } + /** @var Folder $node */ return $this->parseFolder($node, $permissionMask, $depth); } - private function parseFile(File $file, int $permissionMask) { + private function parseFile(File $file, int $permissionMask): array { return $this->format($file, $permissionMask); } - private function parseFolder(Folder $folder, int $permissionMask, int $depth) { + private function parseFolder(Folder $folder, int $permissionMask, int $depth): array { $data = $this->format($folder, $permissionMask); if ($depth === 0) { @@ -127,7 +123,7 @@ class ShareInfoController extends ApiController { return $data; } - private function format(Node $node, int $permissionMask) { + private function format(Node $node, int $permissionMask): array { $entry = []; $entry['id'] = $node->getId(); |