Completed
Push — master ( 2ccb51...4b9a6b )
by ARCANEDEV
02:56
created

UpdateCategoryRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 39
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 4 1
1
<?php namespace Arcanesoft\Blog\Http\Requests\Backend\Categories;
2
3
use Arcanesoft\Blog\Bases\FormRequest;
4
5
/**
6
 * Class     UpdateCategoryRequest
7
 *
8
 * @package  Arcanesoft\Blog\Http\Requests\Backend\Categories
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class UpdateCategoryRequest extends FormRequest
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Category validation rules.
19
     *
20
     * @var array
21
     */
22
    protected $rules = [
23
        'name' => 'required|min:3',
24
    ];
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Main Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Determine if the user is authorized to make this request.
32
     *
33
     * @return bool
34
     */
35
    public function authorize()
36
    {
37
        return true;
38
    }
39
40
    /**
41
     * Get the validation rules that apply to the request.
42
     *
43
     * @return array
44
     */
45
    public function rules()
46
    {
47
        return $this->rules;
48
    }
49
}
50