Skip to content

Commit

Permalink
[10.x] Remove instance return from setUser (#42027)
Browse files Browse the repository at this point in the history
* Remove instance return from setUser

* Fix tests
  • Loading branch information
driesvints authored Apr 18, 2022
1 parent 385d608 commit 83c9acc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions GuardHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ public function id()
* Set the current user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return $this
* @return void
*/
public function setUser(AuthenticatableContract $user)
{
$this->user = $user;

return $this;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions SessionGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ public function getUser()
* Set the current user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return $this
* @return void
*/
public function setUser(AuthenticatableContract $user)
{
Expand All @@ -905,8 +905,6 @@ public function setUser(AuthenticatableContract $user)
$this->loggedOut = false;

$this->fireAuthenticatedEvent($user);

return $this;
}

/**
Expand Down

0 comments on commit 83c9acc

Please sign in to comment.