Skip to content

Commit 3d4413e

Browse files
committed
Changed private static array-properties to const
1 parent 122eb9b commit 3d4413e

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($subject, $ignore = '', $flags = 0): string
7474
*/
7575
public static function create($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)