mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #27512 from nextcloud/debt/noid/return-write-to-cache
Add return type for writeToCache
This commit is contained in:
commit
ed5f9f803e
1 changed files with 2 additions and 4 deletions
|
|
@ -256,17 +256,15 @@ class Connection extends LDAPUtility {
|
|||
/**
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function writeToCache($key, $value) {
|
||||
public function writeToCache($key, $value): void {
|
||||
if (!$this->configured) {
|
||||
$this->readConfiguration();
|
||||
}
|
||||
if (is_null($this->cache)
|
||||
|| !$this->configuration->ldapCacheTTL
|
||||
|| !$this->configuration->ldapConfigurationActive) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
$key = $this->getCacheKey($key);
|
||||
$value = base64_encode(json_encode($value));
|
||||
|
|
|
|||
Loading…
Reference in a new issue