diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 22:55:13 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 22:55:13 +0300 |
commit | 72df65c810e57d2b80242cc50522a881db2b677f (patch) | |
tree | 9c8d50fb0fa50f3be991755ddf00627993fdc48f /apps/dashboard | |
parent | 93e671e81200ce6ea4fed82913fa1ab103a23c33 (diff) |
Fix psalm warnings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dashboard')
-rw-r--r-- | apps/dashboard/lib/Controller/DashboardController.php | 2 | ||||
-rw-r--r-- | apps/dashboard/lib/Service/BackgroundService.php | 1 |
2 files changed, 2 insertions, 1 deletions
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')); } |