| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function authorize(): bool |
||
| 20 | { |
||
| 21 | $user = $this->user($this->route('guard')) ?: $this->attemptUser($this->route('guard')); |
||
|
|
|||
| 22 | |||
| 23 | // Redirect users if their email already verified, no need to process their request |
||
| 24 | if ($user && $user->hasVerifiedEmail()) { |
||
| 25 | throw new GenericException(trans('cortex/auth::messages.verification.email.already_verified'), route('tenantarea.account.settings')); |
||
| 26 | } |
||
| 27 | |||
| 28 | return true; |
||
| 29 | } |
||
| 30 | |||
| 41 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: