mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
chore: Fix psalm issues following strong typing of IUser
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
a8f21da1f7
commit
b37044d484
7 changed files with 7 additions and 6 deletions
|
|
@ -850,7 +850,7 @@ class Trashbin implements IEventListener {
|
|||
|
||||
$softQuota = true;
|
||||
$quota = $user->getQuota();
|
||||
if ($quota === null || $quota === 'none') {
|
||||
if ($quota === 'none') {
|
||||
$quota = Filesystem::free_space('/');
|
||||
$softQuota = false;
|
||||
// inf or unknown free space
|
||||
|
|
|
|||
|
|
@ -879,7 +879,7 @@ class Storage {
|
|||
|
||||
$softQuota = true;
|
||||
$quota = $user->getQuota();
|
||||
if ($quota === null || $quota === 'none') {
|
||||
if ($quota === 'none') {
|
||||
$quota = Filesystem::free_space('/');
|
||||
$softQuota = false;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ class GroupsController extends AUserDataOCSController {
|
|||
foreach ($users as $user) {
|
||||
try {
|
||||
/** @var IUser $user */
|
||||
$userId = (string)$user->getUID();
|
||||
$userId = $user->getUID();
|
||||
$userData = $this->getUserData($userId);
|
||||
// Do not insert empty entry
|
||||
if ($userData !== null) {
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ class Connection extends LDAPUtility {
|
|||
$key = $this->getCacheKey($key);
|
||||
$value = base64_encode(json_encode($value));
|
||||
$ttl = $ttlOverride ?? $this->configuration->ldapCacheTTL;
|
||||
$this->cache->set($key, $value, $ttl);
|
||||
$this->cache->set($key, $value, (int)$ttl);
|
||||
}
|
||||
|
||||
public function clearCache() {
|
||||
|
|
|
|||
|
|
@ -3417,6 +3417,7 @@
|
|||
<code><![CDATA[getPassword]]></code>
|
||||
<code><![CDATA[getRemember]]></code>
|
||||
<code><![CDATA[getScope]]></code>
|
||||
<code><![CDATA[getToken]]></code>
|
||||
<code><![CDATA[setExpires]]></code>
|
||||
<code><![CDATA[setLastCheck]]></code>
|
||||
<code><![CDATA[setName]]></code>
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ class Manager extends PublicEmitter implements IGroupManager {
|
|||
|
||||
$matchingUsers = [];
|
||||
foreach ($groupUsers as $groupUser) {
|
||||
$matchingUsers[(string)$groupUser->getUID()] = $groupUser->getDisplayName();
|
||||
$matchingUsers[$groupUser->getUID()] = $groupUser->getDisplayName();
|
||||
}
|
||||
return $matchingUsers;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ class LazyUser implements IUser {
|
|||
}
|
||||
|
||||
#[\Override]
|
||||
public function getEMailAddress(): string {
|
||||
public function getEMailAddress(): ?string {
|
||||
return $this->getUser()->getEMailAddress();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue