Skip to content

Commit b6ddb17

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent b3d30b8 commit b6ddb17

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Adapter/ConnectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ public function isBound();
3434
* @throws ConnectionTimeoutException When the connection can't be created because of an LDAP_TIMEOUT error
3535
* @throws InvalidCredentialsException When the connection can't be created because of an LDAP_INVALID_CREDENTIALS error
3636
*/
37-
public function bind(string $dn = null, string $password = null);
37+
public function bind(?string $dn = null, ?string $password = null);
3838
}

Adapter/ExtLdap/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function isBound()
7373
*
7474
* @param string $password WARNING: When the LDAP server allows unauthenticated binds, a blank $password will always be valid
7575
*/
76-
public function bind(string $dn = null, string $password = null)
76+
public function bind(?string $dn = null, ?string $password = null)
7777
{
7878
if (!$this->connection) {
7979
$this->connect();

Ldap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(AdapterInterface $adapter)
3232
/**
3333
* {@inheritdoc}
3434
*/
35-
public function bind(string $dn = null, string $password = null)
35+
public function bind(?string $dn = null, ?string $password = null)
3636
{
3737
$this->adapter->getConnection()->bind($dn, $password);
3838
}

LdapInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface LdapInterface
3030
*
3131
* @throws ConnectionException if dn / password could not be bound
3232
*/
33-
public function bind(string $dn = null, string $password = null);
33+
public function bind(?string $dn = null, ?string $password = null);
3434

3535
/**
3636
* Queries a ldap server for entries matching the given criteria.

Security/LdapAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
9494
return $this->authenticator->onAuthenticationFailure($request, $exception);
9595
}
9696

97-
public function start(Request $request, AuthenticationException $authException = null): Response
97+
public function start(Request $request, ?AuthenticationException $authException = null): Response
9898
{
9999
if (!$this->authenticator instanceof AuthenticationEntryPointInterface) {
100100
throw new NotAnEntryPointException(sprintf('Decorated authenticator "%s" does not implement interface "%s".', get_debug_type($this->authenticator), AuthenticationEntryPointInterface::class));

Security/LdapBadge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class LdapBadge implements BadgeInterface
3131
private $searchPassword;
3232
private $queryString;
3333

34-
public function __construct(string $ldapServiceId, string $dnString = '{username}', string $searchDn = '', string $searchPassword = '', string $queryString = null)
34+
public function __construct(string $ldapServiceId, string $dnString = '{username}', string $searchDn = '', string $searchPassword = '', ?string $queryString = null)
3535
{
3636
$this->ldapServiceId = $ldapServiceId;
3737
$this->dnString = $dnString;

Security/LdapUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class LdapUserProvider implements UserProviderInterface, PasswordUpgraderInterfa
4141
private $passwordAttribute;
4242
private $extraFields;
4343

44-
public function __construct(LdapInterface $ldap, string $baseDn, string $searchDn = null, string $searchPassword = null, array $defaultRoles = [], string $uidKey = null, string $filter = null, string $passwordAttribute = null, array $extraFields = [])
44+
public function __construct(LdapInterface $ldap, string $baseDn, ?string $searchDn = null, ?string $searchPassword = null, array $defaultRoles = [], ?string $uidKey = null, ?string $filter = null, ?string $passwordAttribute = null, array $extraFields = [])
4545
{
4646
if (null === $uidKey) {
4747
$uidKey = 'sAMAccountName';

0 commit comments

Comments
 (0)