Skip to content

Commit 3476f6a

Browse files
Remove unused code and unnecessary else branches
1 parent caa82a5 commit 3476f6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adapter/ExtLdap/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ private function connect(): void
149149

150150
if (false === $connection = ldap_connect($this->config['connection_string'])) {
151151
throw new LdapException('Invalid connection string: '.$this->config['connection_string']);
152-
} else {
153-
$this->connection = $connection;
154152
}
155153

154+
$this->connection = $connection;
155+
156156
foreach ($this->config['options'] as $name => $value) {
157157
if (!\in_array(ConnectionOptions::getOption($name), self::PRECONNECT_OPTIONS, true)) {
158158
$this->setOption($name, $value);

0 commit comments

Comments
 (0)