Skip to content

Commit 011eda5

Browse files
committed
UserAuth::check 返回当前实例
1 parent 742e8d1 commit 011eda5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/UserAuth.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function build(): static
6565
throw new TokenInvalidException();
6666
}
6767

68-
public function check(): void
68+
public function check(): static
6969
{
7070
$userId = $this->build()->getId();
7171

@@ -76,6 +76,8 @@ public function check(): void
7676
}
7777

7878
$this->setUser($user);
79+
80+
return $this;
7981
}
8082

8183
public static function load(string $token): static

0 commit comments

Comments
 (0)