From d44ecacd56434b1239e162a47cb27246bdc70f6f Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 10 Mar 2024 23:40:37 -0700 Subject: [PATCH] lint: fix psalm issues Signed-off-by: Varun Patil --- lib/Controller/OtherController.php | 6 ++---- lib/Controller/TemplateResponsePatch.php | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Controller/OtherController.php b/lib/Controller/OtherController.php index 516a8514e..3973fb81d 100644 --- a/lib/Controller/OtherController.php +++ b/lib/Controller/OtherController.php @@ -68,9 +68,7 @@ public function getUserConfig(): Http\Response { return Util::guardEx(function () { // get memories version - $version = \OC::$server->get(\OCP\App\IAppManager::class) - ->getAppInfo('memories')['version'] - ; + $version = \OC::$server->get(\OCP\App\IAppManager::class)->getAppVersion('memories'); // get user if logged in try { @@ -136,7 +134,7 @@ public function describeApi(): Http\Response $urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class); $info = [ - 'version' => $appManager->getAppInfo('memories')['version'], + 'version' => $appManager->getAppVersion('memories'), 'baseUrl' => $urlGenerator->linkToRouteAbsolute('memories.Page.main'), 'loginFlowUrl' => $urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.init'), ]; diff --git a/lib/Controller/TemplateResponsePatch.php b/lib/Controller/TemplateResponsePatch.php index 24964669f..c9607d876 100644 --- a/lib/Controller/TemplateResponsePatch.php +++ b/lib/Controller/TemplateResponsePatch.php @@ -6,6 +6,7 @@ use OCP\AppFramework\Http\TemplateResponse; +/** @psalm-suppress MissingTemplateParam */ class TemplateResponsePatch extends TemplateResponse { public function render()