From 79b6978bb9a3257493f35cd069082b2ed69603f9 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 24 Feb 2023 00:22:21 -0800 Subject: [PATCH] lint: fix php --- lib/Controller/VideoController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Controller/VideoController.php b/lib/Controller/VideoController.php index d49af184..f7603128 100644 --- a/lib/Controller/VideoController.php +++ b/lib/Controller/VideoController.php @@ -82,11 +82,11 @@ class VideoController extends ApiBase // Request and check data was received try { $status = $this->getUpstream($client, $path, $profile); - if ($status === 409 || $status === -1) { + if (409 === $status || -1 === $status) { // Just a conflict (transcoding process changed) return new JSONResponse(['message' => 'Conflict'], Http::STATUS_CONFLICT); } - if ($status !== 200) { + if (200 !== $status) { throw new \Exception("Transcoder returned {$status}"); } } catch (\Exception $e) { @@ -313,6 +313,7 @@ class VideoController extends ApiBase if (0 === $returnCode) { throw new \Exception("Transcoder could not be started, check {$logFile}"); } + return $returnCode; }