VerificationRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fouladgar\MobileVerification\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
/**
8
 * @property mixed token
9
 */
10
class VerificationRequest extends FormRequest
11
{
12
    /**
13
     * Get the validation rules that apply to the request.
14
     *
15
     * @return array
16
     */
17
    public function rules(): array
18
    {
19
        $tokenLength = config('mobile_verifier.token_length', 5);
20
21
        return [
22
            'token' => 'required|string|size:'.$tokenLength,
23
        ];
24
    }
25
}
26