@@ -685,9 +685,7 @@ protected function rehashUserPassword($password, $attribute)
685
685
*/
686
686
public function attempting ($ callback )
687
687
{
688
- if (isset ($ this ->events )) {
689
- $ this ->events ->listen (Events \Attempting::class, $ callback );
690
- }
688
+ $ this ->events ?->listen(Events \Attempting::class, $ callback );
691
689
}
692
690
693
691
/**
@@ -699,11 +697,7 @@ public function attempting($callback)
699
697
*/
700
698
protected function fireAttemptEvent (array $ credentials , $ remember = false )
701
699
{
702
- if (isset ($ this ->events )) {
703
- $ this ->events ->dispatch (new Attempting (
704
- $ this ->name , $ credentials , $ remember
705
- ));
706
- }
700
+ $ this ->events ?->dispatch(new Attempting ($ this ->name , $ credentials , $ remember ));
707
701
}
708
702
709
703
/**
@@ -714,11 +708,7 @@ protected function fireAttemptEvent(array $credentials, $remember = false)
714
708
*/
715
709
protected function fireValidatedEvent ($ user )
716
710
{
717
- if (isset ($ this ->events )) {
718
- $ this ->events ->dispatch (new Validated (
719
- $ this ->name , $ user
720
- ));
721
- }
711
+ $ this ->events ?->dispatch(new Validated ($ this ->name , $ user ));
722
712
}
723
713
724
714
/**
@@ -730,11 +720,7 @@ protected function fireValidatedEvent($user)
730
720
*/
731
721
protected function fireLoginEvent ($ user , $ remember = false )
732
722
{
733
- if (isset ($ this ->events )) {
734
- $ this ->events ->dispatch (new Login (
735
- $ this ->name , $ user , $ remember
736
- ));
737
- }
723
+ $ this ->events ?->dispatch(new Login ($ this ->name , $ user , $ remember ));
738
724
}
739
725
740
726
/**
@@ -745,11 +731,7 @@ protected function fireLoginEvent($user, $remember = false)
745
731
*/
746
732
protected function fireAuthenticatedEvent ($ user )
747
733
{
748
- if (isset ($ this ->events )) {
749
- $ this ->events ->dispatch (new Authenticated (
750
- $ this ->name , $ user
751
- ));
752
- }
734
+ $ this ->events ?->dispatch(new Authenticated ($ this ->name , $ user ));
753
735
}
754
736
755
737
/**
@@ -760,11 +742,7 @@ protected function fireAuthenticatedEvent($user)
760
742
*/
761
743
protected function fireOtherDeviceLogoutEvent ($ user )
762
744
{
763
- if (isset ($ this ->events )) {
764
- $ this ->events ->dispatch (new OtherDeviceLogout (
765
- $ this ->name , $ user
766
- ));
767
- }
745
+ $ this ->events ?->dispatch(new OtherDeviceLogout ($ this ->name , $ user ));
768
746
}
769
747
770
748
/**
@@ -776,11 +754,7 @@ protected function fireOtherDeviceLogoutEvent($user)
776
754
*/
777
755
protected function fireFailedEvent ($ user , array $ credentials )
778
756
{
779
- if (isset ($ this ->events )) {
780
- $ this ->events ->dispatch (new Failed (
781
- $ this ->name , $ user , $ credentials
782
- ));
783
- }
757
+ $ this ->events ?->dispatch(new Failed ($ this ->name , $ user , $ credentials ));
784
758
}
785
759
786
760
/**
0 commit comments