| Total Complexity | 7 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 68.75% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class EmailVerificationRequest extends FormRequest |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Determine if the user is authorized to make this request. |
||
| 16 | * |
||
| 17 | * @return bool |
||
| 18 | */ |
||
| 19 | 2 | public function authorize() |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the validation rules that apply to the request. |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | 1 | public function rules() |
|
| 40 | 1 | // |
|
| 41 | 1 | ]; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Fulfill the email verification request. |
||
| 46 | * |
||
| 47 | * @return void |
||
| 48 | */ |
||
| 49 | public function fulfill() |
||
| 50 | { |
||
| 51 | if (! $this->user('seller')->hasVerifiedEmail()) { |
||
| 52 | $this->user('seller')->markEmailAsVerified(); |
||
| 53 | |||
| 54 | event(new Verified($this->user('seller'))); |
||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Configure the validator instance. |
||
| 60 | * |
||
| 61 | * @return void |
||
| 62 | */ |
||
| 63 | 1 | public function withValidator(Validator $validator) |
|
| 66 | } |
||
| 67 | } |
||
| 68 |