File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ public function attempt(array $credentials, array $scopes = []): string
4444 * @Author : <Jason.C>
4545 * @param \Illuminate\Foundation\Auth\User $user
4646 * @param array $scopes
47- * @return mixed
47+ * @return string
4848 */
49- public function login (User $ user , array $ scopes = [])
49+ public function login (User $ user , array $ scopes = []): string
5050 {
5151 $ this ->app ['auth ' ]->login ($ user );
5252 $ tokenName = $ this ->app ['config ' ]->get ('api.passport_token_name ' );
@@ -60,7 +60,7 @@ public function login(User $user, array $scopes = [])
6060 * Notes : 当前登录用户
6161 * @Date : 2021/7/21 5:30 下午
6262 * @Author : <Jason.C>
63- * @return User
63+ * @return User|null
6464 */
6565 public function user (): ?User
6666 {
@@ -71,9 +71,9 @@ public function user(): ?User
7171 * Notes : 当前登录用户ID
7272 * @Date : 2021/7/21 5:31 下午
7373 * @Author : <Jason.C>
74- * @return int
74+ * @return int|null
7575 */
76- public function userId (): int
76+ public function userId (): ? int
7777 {
7878 return $ this ->app ['auth ' ]->id ();
7979 }
You can’t perform that action at this time.
0 commit comments