From 72df65c810e57d2b80242cc50522a881db2b677f Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 19 Aug 2020 21:55:13 +0200 Subject: [PATCH] Fix psalm warnings Signed-off-by: Morris Jobke --- apps/dashboard/lib/Controller/DashboardController.php | 2 +- apps/dashboard/lib/Service/BackgroundService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php index 5d9f886f0c1..40ed026b82b 100644 --- a/apps/dashboard/lib/Controller/DashboardController.php +++ b/apps/dashboard/lib/Controller/DashboardController.php @@ -152,7 +152,7 @@ class DashboardController extends Controller { return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); } $currentVersion++; - $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', $currentVersion); + $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion); return new JSONResponse([ 'type' => $type, 'value' => $value, diff --git a/apps/dashboard/lib/Service/BackgroundService.php b/apps/dashboard/lib/Service/BackgroundService.php index 7fbe1843e71..605f953d15b 100644 --- a/apps/dashboard/lib/Service/BackgroundService.php +++ b/apps/dashboard/lib/Service/BackgroundService.php @@ -141,6 +141,7 @@ class BackgroundService { */ public function setFileBackground($path): void { $this->config->setUserValue($this->userId, 'dashboard', 'background', 'custom'); + /** @var \OCP\Files\File $file */ $file = $this->userFolder->get($path); $this->dashboardUserFolder->newFile('background.jpg', $file->fopen('r')); } -- 2.39.5