66
77class Ldap implements LdapInterface
88{
9- use HandlesConnection;
109 use DetectsErrors;
10+ use HandlesConnection;
1111
1212 /**
1313 * {@inheritdoc}
@@ -74,7 +74,7 @@ public function countEntries(mixed $result): int
7474 /**
7575 * {@inheritDoc}
7676 */
77- public function compare (string $ dn , string $ attribute , string $ value , array $ controls = null ): bool |int
77+ public function compare (string $ dn , string $ attribute , string $ value , ? array $ controls = null ): bool |int
7878 {
7979 return $ this ->executeFailableOperation (function () use ($ dn , $ attribute , $ value , $ controls ) {
8080 return ldap_compare ($ this ->connection , $ dn , $ attribute , $ value , $ controls );
@@ -192,7 +192,7 @@ public function close(): bool
192192 /**
193193 * {@inheritdoc}
194194 */
195- public function search (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , array $ controls = null ): mixed
195+ public function search (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , ? array $ controls = null ): mixed
196196 {
197197 return $ this ->executeFailableOperation (function () use (
198198 $ dn ,
@@ -211,7 +211,7 @@ public function search(string $dn, string $filter, array $fields, bool $onlyAttr
211211 /**
212212 * {@inheritdoc}
213213 */
214- public function list (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , array $ controls = null ): mixed
214+ public function list (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , ? array $ controls = null ): mixed
215215 {
216216 return $ this ->executeFailableOperation (function () use (
217217 $ dn ,
@@ -230,7 +230,7 @@ public function list(string $dn, string $filter, array $fields, bool $onlyAttrib
230230 /**
231231 * {@inheritdoc}
232232 */
233- public function read (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , array $ controls = null ): mixed
233+ public function read (string $ dn , string $ filter , array $ fields , bool $ onlyAttributes = false , int $ size = 0 , int $ time = 0 , int $ deref = LDAP_DEREF_NEVER , ? array $ controls = null ): mixed
234234 {
235235 return $ this ->executeFailableOperation (function () use (
236236 $ dn ,
@@ -249,7 +249,7 @@ public function read(string $dn, string $filter, array $fields, bool $onlyAttrib
249249 /**
250250 * {@inheritdoc}
251251 */
252- public function parseResult (mixed $ result , int &$ errorCode = 0 , string &$ dn = null , string &$ errorMessage = null , array &$ referrals = null , array &$ controls = null ): LdapResultResponse |false
252+ public function parseResult (mixed $ result , int &$ errorCode = 0 , ? string &$ dn = null , ? string &$ errorMessage = null , ? array &$ referrals = null , ? array &$ controls = null ): LdapResultResponse |false
253253 {
254254 if (ldap_parse_result ($ this ->connection , $ result , $ errorCode , $ dn , $ errorMessage , $ referrals , $ controls )) {
255255 return new LdapResultResponse (
@@ -267,7 +267,7 @@ public function parseResult(mixed $result, int &$errorCode = 0, string &$dn = nu
267267 /**
268268 * {@inheritdoc}
269269 */
270- public function bind (string $ dn = null , string $ password = null , array $ controls = null ): LdapResultResponse
270+ public function bind (? string $ dn = null , ? string $ password = null , ? array $ controls = null ): LdapResultResponse
271271 {
272272 /** @var \LDAP\Result $result */
273273 $ result = $ this ->executeFailableOperation (function () use ($ dn , $ password , $ controls ) {
@@ -284,7 +284,7 @@ public function bind(string $dn = null, string $password = null, array $controls
284284 /**
285285 * {@inheritDoc}
286286 */
287- public function saslBind (string $ dn = null , string $ password = null , array $ options = []): bool
287+ public function saslBind (? string $ dn = null , ? string $ password = null , array $ options = []): bool
288288 {
289289 return $ this ->executeFailableOperation (function () use ($ dn , $ password , $ options ) {
290290 $ options = array_merge ([
0 commit comments