diff --git a/src/Query/Builder.php b/src/Query/Builder.php index 72e07a13..bfaad050 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -1402,11 +1402,11 @@ public function insertAndGetDn(string $dn, array $attributes): string|false ); } - $result = $this->connection->run( + $successful = $this->connection->run( fn (LdapInterface $ldap) => $ldap->add($dn, $attributes) ); - return $result ? $dn : false; + return $successful ? $dn : false; } /** @@ -1474,11 +1474,11 @@ public function renameAndGetDn(string $dn, string $rdn, string $newParentDn, boo { $newParentDn = $this->substituteBaseDn($newParentDn); - $result = $this->connection->run( + $successful = $this->connection->run( fn (LdapInterface $ldap) => $ldap->rename($dn, $rdn, $newParentDn, $deleteOldRdn) ); - return $result ? implode(',', [$rdn, $newParentDn]) : false; + return $successful ? implode(',', [$rdn, $newParentDn]) : false; } /**