SoundRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace App\Http\Requests;
4
5
class SoundRequest extends SoundAdminRequest
6
{
7
    /**
8
     * Get the validation rules that apply to the request.
9
     *
10
     * @return array
11
     */
12
    public function rules()
13
    {
14
        return [
15
            'title'     => 'required|string|min:3|max:255|unique:sounds,title,'.$this->sound,
16
            'enabled'   => 'required|boolean',
17
            'file'      => 'required|string|min:12|max:255',
18
        ];
19
    }
20
}
21