From: Morris Jobke Date: Wed, 19 Aug 2020 19:55:13 +0000 (+0200) Subject: Fix psalm warnings X-Git-Tag: v20.0.0beta1~35^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F22214%2Fhead;p=nextcloud-server.git Fix psalm warnings Signed-off-by: Morris Jobke --- 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')); }