[LDAP] fixed typos and CS

This commit is contained in:
Fabien Potencier 2019-03-31 10:31:43 +02:00
parent 22234e331e
commit 5e079536c9
2 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@ use Symfony\Component\Ldap\Exception\NotBoundException;
* @author Bob van de Vijver <bobvandevijver@hotmail.com>
* @author Kevin Schuurmans <kevin.schuurmans@freshheads.com>
*
* The move() methods must be added to the interface in Symfony 5.0
* @method void move(Entry $entry, string $newParent) Moves an entry on the Ldap server
*/
interface EntryManagerInterface

View File

@ -114,7 +114,7 @@ class EntryManager implements EntryManagerInterface
* Moves an entry on the Ldap server.
*
* @throws NotBoundException if the connection has not been previously bound.
* @throws LdapException if an error is thrown during the rename operation.
* @throws LdapException if an error is thrown during the rename operation.
*/
public function move(Entry $entry, string $newParent)
{
@ -156,10 +156,10 @@ class EntryManager implements EntryManagerInterface
}
}
private function parseRdnFromEntry(Entry $entry)
private function parseRdnFromEntry(Entry $entry)
{
if (!preg_match('/^([^,]+),/', $entry->getDn(), $matches)) {
throw new LdapException(sprintf('Entry "%s" malformed, could not parse RDN', $entry->getDn()));
throw new LdapException(sprintf('Entry "%s" malformed, could not parse RDN.', $entry->getDn()));
}
return $matches[1];