Merge pull request #27512 from nextcloud/debt/noid/return-write-to-cache

Add return type for writeToCache
pull/26430/head
kesselb 2021-06-15 20:19:30 +07:00 committed by GitHub
commit ed5f9f803e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));