File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ class RedisWatcher implements Watcher
18
18
{
19
19
private Closure $ callback ;
20
20
21
- private $ pubRedis ;
21
+ private Client $ pubRedis ;
22
22
23
- private $ subRedis ;
23
+ private Client $ subRedis ;
24
24
25
25
private $ channel ;
26
26
/**
@@ -86,12 +86,7 @@ public function close(): void
86
86
*/
87
87
private function createRedisClient (array $ config ): Client
88
88
{
89
- $ config ['host ' ] = $ config ['host ' ] ?? '127.0.0.1 ' ;
90
- $ config ['port ' ] = $ config ['port ' ] ?? 6379 ;
91
- $ config ['password ' ] = $ config ['password ' ] ?? '' ;
92
- $ config ['database ' ] = $ config ['database ' ] ?? 0 ;
93
-
94
- $ redis = new Client ('redis:// ' . $ config ['host ' ] . ': ' . $ config ['port ' ]);
89
+ $ redis = new Client ('redis:// ' . $ config ['host ' ] ?? '127.0.0.1 ' . ': ' . $ config ['port ' ] ?? 6379 );
95
90
$ redis ->auth ($ config ['password ' ] ?? '' );
96
91
97
92
return $ redis ;
You can’t perform that action at this time.
0 commit comments