summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AvatarManager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/AvatarManager.php b/lib/private/AvatarManager.php
index b8c6c2a1eb6..dea7f5f3a07 100644
--- a/lib/private/AvatarManager.php
+++ b/lib/private/AvatarManager.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -29,6 +30,7 @@ namespace OC;
use OCP\Files\IAppData;
use OCP\Files\NotFoundException;
+use OCP\IAvatar;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\ILogger;
@@ -85,9 +87,9 @@ class AvatarManager implements IAvatarManager {
* @throws \Exception In case the username is potentially dangerous
* @throws NotFoundException In case there is no user folder yet
*/
- public function getAvatar($userId) {
+ public function getAvatar(string $userId) : IAvatar {
$user = $this->userManager->get($userId);
- if (is_null($user)) {
+ if ($user === null) {
throw new \Exception('user does not exist');
}