Skip to content

Commit 691f156

Browse files
committed
Fix UriInterface username related methods naming convention
1 parent 91e7e76 commit 691f156

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Uri.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ public function withUserInfo(
15501550
};
15511551
}
15521552

1553-
public function withUser(Stringable|string|null $user): UriInterface
1553+
public function withUsername(Stringable|string|null $user): UriInterface
15541554
{
15551555
return $this->withUserInfo($user, $this->pass);
15561556
}

UriTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ public function it_will_fail_to_generate_an_anchor_tag_html_for_the_instance():
10891089
#[Test]
10901090
public function it_can_update_the_user_component(): void
10911091
{
1092-
self::assertSame('user', Uri::new('example://host/path?query')->withUser('user')->getUsername());
1093-
self::assertNull(Uri::new('example://user@host/path?query')->withUser(null)->getUsername());
1092+
self::assertSame('user', Uri::new('example://host/path?query')->withUsername('user')->getUsername());
1093+
self::assertNull(Uri::new('example://user@host/path?query')->withUsername(null)->getUsername());
10941094
}
10951095

10961096
#[Test]

0 commit comments

Comments
 (0)