diff --git a/src/Connector/Ldap.php b/src/Connector/Ldap.php index 99361d94a..c62de6092 100644 --- a/src/Connector/Ldap.php +++ b/src/Connector/Ldap.php @@ -112,11 +112,18 @@ public function bind(?string $username, #[\SensitiveParameter]?string $password) /** * @inheritDoc */ - public function saslBind(?string $username, #[\SensitiveParameter]?string $password, ?string $mech, ?string $realm, ?string $authcId, ?string $authzId, ?string $props): void - - { - if (!method_exists($this->connection, 'saslBind')) + public function saslBind( + ?string $username, + #[\SensitiveParameter]?string $password, + ?string $mech, + ?string $realm, + ?string $authcId, + ?string $authzId, + ?string $props, + ): void { + if (!method_exists($this->connection, 'saslBind')) { throw new Error\Error("SASL not implemented"); + } try { $this->connection->saslBind($username, strval($password), $mech, $realm, $authcId, $authzId, $props); @@ -136,8 +143,9 @@ public function saslBind(?string $username, #[\SensitiveParameter]?string $passw */ public function whoami(): string { - if (!method_exists($this->connection, 'whoami')) + if (!method_exists($this->connection, 'whoami')) { throw new Error\Error("SASL not implemented"); + } return $this->connection->whoami(); }