Test Setup Failed
Push — master ( e99bf7...207075 )
by Nathan
05:26
created

GeneralUpdateRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\Requests\Account;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
/**
8
 * @property mixed username
9
 */
10
class GeneralUpdateRequest extends FormRequest
11
{
12
    /**
13
     * Determine if the user is authorized to make this request.
14
     *
15
     * @return bool
16
     */
17
    public function authorize()
18
    {
19
        return true;
20
    }
21
22
    /**
23
     * Get the validation rules that apply to the request.
24
     *
25
     * @return array
26
     */
27
    public function rules()
28
    {
29
        return [
30
            'username' => 'required|min:3',
31
            'email' => 'required',
32
            'preferences' => [
33
                'language' => 'required',
34
                'notifications' => 'required'
35
            ],
36
        ];
37
    }
38
}
39