Skip to content

Commit

Permalink
Remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Nov 8, 2023
1 parent 8ad4b30 commit 5d8d856
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1402,11 +1402,9 @@ public function insertAndGetDn(string $dn, array $attributes): string|false
);
}

$successful = $this->connection->run(
return $this->connection->run(
fn (LdapInterface $ldap) => $ldap->add($dn, $attributes)
);

return $successful ? $dn : false;
) ? $dn : false;
}

/**
Expand Down Expand Up @@ -1474,11 +1472,9 @@ public function renameAndGetDn(string $dn, string $rdn, string $newParentDn, boo
{
$newParentDn = $this->substituteBaseDn($newParentDn);

$successful = $this->connection->run(
return $this->connection->run(
fn (LdapInterface $ldap) => $ldap->rename($dn, $rdn, $newParentDn, $deleteOldRdn)
);

return $successful ? implode(',', [$rdn, $newParentDn]) : false;
) ? implode(',', [$rdn, $newParentDn]) : false;
}

/**
Expand Down

0 comments on commit 5d8d856

Please sign in to comment.