File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ private function createAuthorityFromComponents(array $components): ?Authority
113113 return new Authority (
114114 host: $ components ['host ' ],
115115 port: $ components ['port ' ],
116- userInfo : $ this ->createUserInfoFromComponents ($ components ),
116+ info : $ this ->createUserInfoFromComponents ($ components ),
117117 );
118118 }
119119
@@ -122,13 +122,13 @@ private function createAuthorityFromComponents(array $components): ?Authority
122122 */
123123 private function createUserInfoFromComponents (array $ components ): ?UserInfo
124124 {
125- if (!isset ($ components ['user ' ]) || $ components [ ' user ' ] === '' ) {
125+ if (!isset ($ components ['user ' ])) {
126126 return null ;
127127 }
128128
129129 return new UserInfo (
130130 user: $ components ['user ' ],
131- password: $ components ['pass ' ] === '' ? null : $ components [ ' pass ' ] ,
131+ password: $ components ['pass ' ],
132132 );
133133 }
134134
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function testCreateUriFromStringWithFullUri(): void
3434 self ::assertSame ('https ' , $ uri ->scheme ?->toString());
3535 self ::assertSame ('host ' , $ uri ->authority ?->host);
3636 self ::assertSame (8080 , $ uri ->authority ?->port);
37- self ::assertSame ('user ' , $ uri ->authority ?->userInfo?->user );
37+ self ::assertSame ('user ' , $ uri ->authority ?->userInfo?->username );
3838 self ::assertSame ('pass ' , $ uri ->authority ?->userInfo?->password);
3939 self ::assertSame ('/path/to/resource ' , $ uri ->path ->toString ());
4040 self ::assertSame ('foo=bar ' , $ uri ->query ->toString ());
You can’t perform that action at this time.
0 commit comments