Completed
Push — feature/backpack ( 16fb41...46736d )
by Chris
10:31 queued 01:05
created

SkillRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Http\Requests;
4
5
use App\Http\Requests\Request;
0 ignored issues
show
Bug introduced by
The type App\Http\Requests\Request was not found. Did you mean Request? If so, make sure to prefix the type with \.
Loading history...
6
use Illuminate\Foundation\Http\FormRequest;
7
8
class SkillRequest extends FormRequest
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class SkillRequest
Loading history...
9
{
10
    /**
11
     * Determine if the user is authorized to make this request.
12
     *
13
     * @return boolean
14
     */
15
    public function authorize()
16
    {
17
        // only allow updates if the user is logged in
18
        return \Auth::check();
19
    }
20
21
    /**
22
     * Get the validation rules that apply to the request.
23
     *
24
     * @return []string
0 ignored issues
show
Documentation Bug introduced by
The doc comment []string at position 0 could not be parsed: Unknown type name '[' at position 0 in []string.
Loading history...
25
     */
26
    public function rules()
27
    {
28
        return [
29
            'name' => 'required|unique:skills',
30
            'description' => 'required'
31
        ];
32
    }
33
34
    /**
35
     * Get the validation attributes that apply to the request.
36
     *
37
     * @return array
38
     */
39
    public function attributes()
40
    {
41
        return [
42
            //
43
        ];
44
    }
45
46
    /**
47
     * Get the validation messages that apply to the request.
48
     *
49
     * @return array
50
     */
51
    public function messages()
52
    {
53
        return [
54
            //
55
        ];
56
    }
57
}
58