| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public static function validateEmail(array $data): Validator |
||
| 18 | { |
||
| 19 | $rules = [ |
||
| 20 | 'email' => 'required|email' |
||
| 21 | ]; |
||
| 22 | |||
| 23 | // Bipass the captcha for the unit testing. |
||
| 24 | if (App::environment() !== 'testing') { |
||
| 25 | $rules = array_merge($rules, ['g-recaptcha-response' => 'required|recaptcha']); |
||
| 26 | } |
||
| 27 | |||
| 28 | return FacadeValidator::make($data, $rules); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |