]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add return type for writeToCache 27512/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 15 Jun 2021 15:03:03 +0000 (17:03 +0200)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 15 Jun 2021 15:03:03 +0000 (17:03 +0200)
writeToCache does not return a string.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/user_ldap/lib/Connection.php

index 3c4cf7001a2b8f6e4c6a2ea928ca13e4d05fe4d0..d57ec9ee6f8e8fe34eef7603137701a1edc5fdd6 100644 (file)
@@ -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));