diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php index d9b2dd4f5d..581cf153ed 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php @@ -48,7 +48,7 @@ class Collection implements CollectionInterface return $count; } - throw new LdapException(sprintf('Error while retrieving entry count: %s', ldap_error($this->connection->getResource()))); + throw new LdapException(sprintf('Error while retrieving entry count: %s.', ldap_error($this->connection->getResource()))); } public function getIterator() @@ -62,7 +62,7 @@ class Collection implements CollectionInterface } if (false === $current) { - throw new LdapException(sprintf('Could not rewind entries array: %s', ldap_error($con))); + throw new LdapException(sprintf('Could not rewind entries array: %s.', ldap_error($con))); } yield $this->getSingleEntry($con, $current); @@ -105,7 +105,7 @@ class Collection implements CollectionInterface $attributes = ldap_get_attributes($con, $current); if (false === $attributes) { - throw new LdapException(sprintf('Could not fetch attributes: %s', ldap_error($con))); + throw new LdapException(sprintf('Could not fetch attributes: %s.', ldap_error($con))); } $attributes = $this->cleanupAttributes($attributes); @@ -113,7 +113,7 @@ class Collection implements CollectionInterface $dn = ldap_get_dn($con, $current); if (false === $dn) { - throw new LdapException(sprintf('Could not fetch DN: %s', ldap_error($con))); + throw new LdapException(sprintf('Could not fetch DN: %s.', ldap_error($con))); } return new Entry($dn, $attributes); diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php index d705b3bce9..1a6ea28ac6 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php @@ -134,11 +134,11 @@ class Connection extends AbstractConnection } if (false === $this->connection) { - throw new LdapException(sprintf('Could not connect to Ldap server: %s', ldap_error($this->connection))); + throw new LdapException(sprintf('Could not connect to Ldap server: %s.', ldap_error($this->connection))); } if ('tls' === $this->config['encryption'] && false === ldap_start_tls($this->connection)) { - throw new LdapException(sprintf('Could not initiate TLS connection: %s', ldap_error($this->connection))); + throw new LdapException(sprintf('Could not initiate TLS connection: %s.', ldap_error($this->connection))); } } diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php index 95d65e020a..6d878aa699 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php @@ -65,7 +65,7 @@ final class ConnectionOptions $constantName = self::getOptionName($name); if (!defined($constantName)) { - throw new LdapException(sprintf('Unknown option "%s"', $name)); + throw new LdapException(sprintf('Unknown option "%s".', $name)); } return constant($constantName); diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php index 225414884b..871c4b0495 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php @@ -38,7 +38,7 @@ class EntryManager implements EntryManagerInterface, RenameEntryInterface $con = $this->getConnectionResource(); if (!@ldap_add($con, $entry->getDn(), $entry->getAttributes())) { - throw new LdapException(sprintf('Could not add entry "%s": %s', $entry->getDn(), ldap_error($con))); + throw new LdapException(sprintf('Could not add entry "%s": %s.', $entry->getDn(), ldap_error($con))); } return $this; @@ -52,7 +52,7 @@ class EntryManager implements EntryManagerInterface, RenameEntryInterface $con = $this->getConnectionResource(); if (!@ldap_modify($con, $entry->getDn(), $entry->getAttributes())) { - throw new LdapException(sprintf('Could not update entry "%s": %s', $entry->getDn(), ldap_error($con))); + throw new LdapException(sprintf('Could not update entry "%s": %s.', $entry->getDn(), ldap_error($con))); } } @@ -64,7 +64,7 @@ class EntryManager implements EntryManagerInterface, RenameEntryInterface $con = $this->getConnectionResource(); if (!@ldap_delete($con, $entry->getDn())) { - throw new LdapException(sprintf('Could not remove entry "%s": %s', $entry->getDn(), ldap_error($con))); + throw new LdapException(sprintf('Could not remove entry "%s": %s.', $entry->getDn(), ldap_error($con))); } } @@ -76,7 +76,7 @@ class EntryManager implements EntryManagerInterface, RenameEntryInterface $con = $this->getConnectionResource(); if (!@ldap_rename($con, $entry->getDn(), $newRdn, null, $removeOldRdn)) { - throw new LdapException(sprintf('Could not rename entry "%s" to "%s": %s', $entry->getDn(), $newRdn, ldap_error($con))); + throw new LdapException(sprintf('Could not rename entry "%s" to "%s": %s.', $entry->getDn(), $newRdn, ldap_error($con))); } } diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php index 4ff85b2181..09cb42c7d3 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -45,7 +45,7 @@ class Query extends AbstractQuery $this->search = null; if (!$success) { - throw new LdapException(sprintf('Could not free results: %s', ldap_error($con))); + throw new LdapException(sprintf('Could not free results: %s.', ldap_error($con))); } } @@ -73,7 +73,7 @@ class Query extends AbstractQuery $func = 'ldap_search'; break; default: - throw new LdapException(sprintf('Could not search in scope "%s"', $this->options['scope'])); + throw new LdapException(sprintf('Could not search in scope "%s".', $this->options['scope'])); } $this->search = @$func( @@ -89,7 +89,7 @@ class Query extends AbstractQuery } if (false === $this->search) { - throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s"', $this->dn, $this->query, implode(',', $this->options['filter']))); + throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s".', $this->dn, $this->query, implode(',', $this->options['filter']))); } return new Collection($this->connection, $this);