]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: don't check var type when you can specify the type in the parameter list
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 6 Sep 2013 18:52:26 +0000 (20:52 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 27 Sep 2013 11:34:15 +0000 (13:34 +0200)
apps/user_ldap/lib/backendbase.php

index 7ed079b34180e0a98a9a0233558d4c4414b454a8..5ed73a0a5b1639d5b5d3f5f66754c530c462f5bc 100644 (file)
@@ -39,12 +39,8 @@ abstract class BackendBase {
         * The LDAP Wrapper must implement the PHP LDAP functions, which are used
         * in the LDAP backend
         */
-       public function setLDAPWrapper($ldapWrapper) {
-               if(is_object($ldapWrapper)) {
-                       unset($this->ldap);
-                       $this->ldap = $ldapWrapper;
-                       return true;
-               }
-               return false;
+       public function setLDAPWrapper(ILDAPWrapper $ldapWrapper) {
+               $this->ldap = $ldapWrapper;
+               return true;
        }
 }
\ No newline at end of file