Skip to content

Commit 9f496f1

Browse files
Merge branch '5.1' into 5.2
* 5.1: Changed private static array-properties to const
2 parents abdf125 + b994c8f commit 9f496f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Ldap.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class Ldap implements LdapInterface
2323
{
2424
private $adapter;
2525

26-
private static $adapterMap = [
26+
private const ADAPTER_MAP = [
2727
'ext_ldap' => 'Symfony\Component\Ldap\Adapter\ExtLdap\Adapter',
2828
];
2929

@@ -74,11 +74,11 @@ public function escape(string $subject, string $ignore = '', int $flags = 0): st
7474
*/
7575
public static function create(string $adapter, array $config = []): self
7676
{
77-
if (!isset(self::$adapterMap[$adapter])) {
78-
throw new DriverNotFoundException(sprintf('Adapter "%s" not found. You should use one of: "%s".', $adapter, implode('", "', self::$adapterMap)));
77+
if (!isset(self::ADAPTER_MAP[$adapter])) {
78+
throw new DriverNotFoundException(sprintf('Adapter "%s" not found. You should use one of: "%s".', $adapter, implode('", "', self::ADAPTER_MAP)));
7979
}
8080

81-
$class = self::$adapterMap[$adapter];
81+
$class = self::ADAPTER_MAP[$adapter];
8282

8383
return new self(new $class($config));
8484
}

0 commit comments

Comments
 (0)