From c41854e1412dc91d5668bab108c78817196245d8 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Wed, 9 Nov 2022 00:52:44 -0800 Subject: [PATCH] Lint --- lib/Controller/VideoController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Controller/VideoController.php b/lib/Controller/VideoController.php index d677b68f..72f90fdc 100644 --- a/lib/Controller/VideoController.php +++ b/lib/Controller/VideoController.php @@ -24,8 +24,8 @@ declare(strict_types=1); namespace OCA\Memories\Controller; use OCP\AppFramework\Http; -use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\DataDisplayResponse; +use OCP\AppFramework\Http\JSONResponse; class VideoController extends ApiBase { @@ -55,7 +55,7 @@ class VideoController extends ApiBase // Get file $files = $this->rootFolder->getUserFolder($user->getUID())->getById($fileid); - if (count($files) === 0) { + if (0 === \count($files)) { return new JSONResponse(['message' => 'File not found'], Http::STATUS_NOT_FOUND); } $file = $files[0]; @@ -72,13 +72,13 @@ class VideoController extends ApiBase } // Make upstream request - $ch = curl_init("http://localhost:9999/vod/$path/$profile"); + $ch = curl_init("http://localhost:9999/vod/{$path}/{$profile}"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_HEADER, 0); $data = curl_exec($ch); $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); - $returnCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); + $returnCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); // Check data was received