ProductModelUpdateRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 3 1
A rules() 0 6 1
1
<?php
2
3
namespace Yeelight\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
/**
8
 * Class ProductModelUpdateRequest
9
 *
10
 * @category Yeelight
11
 *
12
 * @package Yeelight\Http\Requests
13
 *
14
 * @author Sheldon Lee <[email protected]>
15
 *
16
 * @license https://opensource.org/licenses/MIT MIT
17
 *
18
 * @link https://www.yeelight.com
19
 */
20
class ProductModelUpdateRequest extends FormRequest
21
{
22
    /**
23
     * Determine if the user is authorized to make this request.
24
     *
25
     * @return bool
26
     */
27
    public function authorize()
28
    {
29
        return true;
30
    }
31
32
    /**
33
     * Get the validation rules that apply to the request.
34
     *
35
     * @return array
36
     */
37
    public function rules()
38
    {
39
        return [
40
            'title'      => 'required',
41
            'model_name' => 'required|max:150',
42
            'code'       => 'required|max:50',
43
        ];
44
    }
45
}
46