Completed
Push — master ( ebed0b...7356ba )
by Jeremy
04:47
created

SoundRequest::authorize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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