lint: fix php

pull/474/head
Varun Patil 2023-03-10 12:17:11 -08:00
parent 71e1ff605e
commit c74ef0766c
1 changed files with 9 additions and 2 deletions

View File

@ -32,6 +32,9 @@ class ShareController extends ApiBase
* @NoAdminRequired * @NoAdminRequired
* *
* Get the tokens of a node shared using an external link * Get the tokens of a node shared using an external link
*
* @param mixed $id
* @param mixed $path
*/ */
public function links($id, $path) public function links($id, $path)
{ {
@ -80,6 +83,9 @@ class ShareController extends ApiBase
* @NoAdminRequired * @NoAdminRequired
* *
* Share a node using an external link * Share a node using an external link
*
* @param mixed $id
* @param mixed $path
*/ */
public function createNode($id, $path) public function createNode($id, $path)
{ {
@ -137,7 +143,8 @@ class ShareController extends ApiBase
return new JSONResponse([], Http::STATUS_OK); return new JSONResponse([], Http::STATUS_OK);
} }
private function getNodeByIdOrPath($id, $path) { private function getNodeByIdOrPath($id, $path)
{
$uid = $this->getUID(); $uid = $this->getUID();
if (!$uid) { if (!$uid) {
return null; return null;
@ -146,7 +153,7 @@ class ShareController extends ApiBase
$file = null; $file = null;
if ($id) { if ($id) {
$file = $this->getUserFile($id); $file = $this->getUserFile($id);
} else if ($path) { } elseif ($path) {
$userFolder = $this->rootFolder->getUserFolder($uid); $userFolder = $this->rootFolder->getUserFolder($uid);
$file = $userFolder->get($path); $file = $userFolder->get($path);
} }