8000 cs fix · symfony/symfony@3e389e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e389e8

Browse files
committed
cs fix
1 parent 708eb79 commit 3e389e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi
9696
$params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?<user>[^:@]*+):)?(?<password>[^@]*+)@)?#', function ($m) use (&$auth) {
9797
if (isset($m['password'])) {
9898
// if user is not `default` then it is acl user
99-
if (!empty($m['user']) && $m['user'] !== 'default') {
99+
if (!empty($m['user']) && 'default' !== $m['user']) {
100100
$auth = [$m['user'], $m['password']];
101101
} else {
102102
$auth = $m['password'];
@@ -106,6 +106,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi
106106
$auth = null;
107107
}
108108
}
109+
109110
return 'file:'.($m[1] ?? '');
110111
}, $dsn);
111112

@@ -303,7 +304,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi
303304
$params['parameters']['database'] = $params['dbindex'];
304305
}
305306
if (null !== $auth) {
306-
$params['parameters']['password'] = is_array($auth) ? $auth[1] : $auth;
307+
$params['parameters']['password'] = \is_array($auth) ? $auth[1] : $auth;
307308
}
308309
if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) {
309310
$hosts = $hosts[0];

0 commit comments

Comments
 (0)
0