@@ -49,25 +49,24 @@ class Ldap implements ConnectorInterface
4949 public function __construct (
5050 string $ connection_strings ,
5151 string $ encryption = 'ssl ' ,
52- int $ version = 3 ,
52+ int $ version = 3 ,
5353 string $ extension = 'ext_ldap ' ,
54- bool $ debug = false ,
55- array $ options = ['referrals ' => false , 'network_timeout ' => 3 ]
54+ bool $ debug = false ,
55+ array $ options = ['referrals ' => false , 'network_timeout ' => 3 ]
5656 ) {
5757 foreach (explode (' ' , $ connection_strings ) as $ connection_string ) {
5858 Assert::regex ($ connection_string , '#^ldap[s]?:\/\/# ' );
5959 }
6060
61- Logger::debug (
62- sprintf (
63- "Setting up LDAP connection: host='%s', encryption=%s, version=%d, debug=%s, timeout=%d, referrals=%s. " ,
64- $ connection_strings ,
65- $ encryption ,
66- $ version ,
67- var_export ($ debug , true ),
68- $ options ['timeout ' ] ?? ini_get ('default_socket_timeout ' ),
69- var_export ($ options ['referrals ' ] ?? false , true ),
70- ));
61+ Logger::debug (sprintf (
62+ "Setting up LDAP connection: host='%s', encryption=%s, version=%d, debug=%s, timeout=%d, referrals=%s. " ,
63+ $ connection_strings ,
64+ $ encryption ,
65+ $ version ,
66+ var_export ($ debug , true ),
67+ $ options ['timeout ' ] ?? ini_get ('default_socket_timeout ' ),
68+ var_export ($ options ['referrals ' ] ?? false , true ),
69+ ));
7170
7271 $ this ->adapter = new Adapter (
7372 [
@@ -111,12 +110,11 @@ public function bind(string $username, ?string $password): void
111110 * @inheritDoc
112111 */
113112 public function search (
114- array $ searchBase ,
113+ array $ searchBase ,
115114 string $ filter ,
116- array $ options ,
117- bool $ allowMissing
118- ): ?Entry
119- {
115+ array $ options ,
116+ bool $ allowMissing
117+ ): ?Entry {
120118 $ entry = null ;
121119
122120 foreach ($ searchBase as $ base ) {
@@ -164,12 +162,11 @@ public function search(
164162 * @inheritDoc
165163 */
166164 public function searchForMultiple (
167- array $ searchBase ,
165+ array $ searchBase ,
168166 string $ filter ,
169- array $ options ,
170- bool $ allowMissing
171- ): array
172- {
167+ array $ options ,
168+ bool $ allowMissing
169+ ): array {
173170 $ results = [];
174171
175172 foreach ($ searchBase as $ base ) {
0 commit comments