@@ -33,25 +33,25 @@ public function __construct(#[\SensitiveParameter] string $dsn)
33
33
{
34
34
$ this ->originalDsn = $ dsn ;
35
35
36
- if (false === $ parsedDsn = parse_url ($ dsn )) {
36
+ if (false === $ params = parse_url ($ dsn )) {
37
37
throw new InvalidArgumentException ('The notifier DSN is invalid. ' );
38
38
}
39
39
40
- if (!isset ($ parsedDsn ['scheme ' ])) {
40
+ if (!isset ($ params ['scheme ' ])) {
41
41
throw new InvalidArgumentException ('The notifier DSN must contain a scheme. ' );
42
42
}
43
- $ this ->scheme = $ parsedDsn ['scheme ' ];
43
+ $ this ->scheme = $ params ['scheme ' ];
44
44
45
- if (!isset ($ parsedDsn ['host ' ])) {
45
+ if (!isset ($ params ['host ' ])) {
46
46
throw new InvalidArgumentException ('The notifier DSN must contain a host (use "default" by default). ' );
47
47
}
48
- $ this ->host = $ parsedDsn ['host ' ];
48
+ $ this ->host = $ params ['host ' ];
49
49
50
- $ this ->user = '' !== ($ parsedDsn ['user ' ] ?? '' ) ? urldecode ( $ parsedDsn ['user ' ]) : null ;
51
- $ this ->password = '' !== ($ parsedDsn ['pass ' ] ?? '' ) ? urldecode ( $ parsedDsn ['pass ' ]) : null ;
52
- $ this ->port = $ parsedDsn ['port ' ] ?? null ;
53
- $ this ->path = $ parsedDsn ['path ' ] ?? null ;
54
- parse_str ($ parsedDsn ['query ' ] ?? '' , $ this ->options );
50
+ $ this ->user = '' !== ($ params ['user ' ] ?? '' ) ? rawurldecode ( $ params ['user ' ]) : null ;
51
+ $ this ->password = '' !== ($ params ['pass ' ] ?? '' ) ? rawurldecode ( $ params ['pass ' ]) : null ;
52
+ $ this ->port = $ params ['port ' ] ?? null ;
53
+ $ this ->path = $ params ['path ' ] ?? null ;
54
+ parse_str ($ params ['query ' ] ?? '' , $ this ->options );
55
55
}
56
56
57
57
public function getScheme (): string
0 commit comments