Completed
Push — master ( 481caa...7f6b38 )
by ARCANEDEV
02:50
created

FormRequest::sanitize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Arcanedev\Support\Http;
2
3
use Illuminate\Foundation\Http\FormRequest as BaseFormRequest;
4
5
/**
6
 * Class     FormRequest
7
 *
8
 * @package  Arcanedev\Support
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
abstract class FormRequest extends BaseFormRequest
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Determine if the user is authorized to make this request.
20
     *
21
     * @return bool
22
     */
23
    public function authorize()
24
    {
25
        return false;
26
    }
27
28
    /**
29
     * Get the validation rules that apply to the request.
30
     *
31
     * @return array
32
     */
33
    abstract public function rules();
34
35
    /**
36
     * Prepare the data for validation.
37
     */
38 6
    protected function prepareForValidation()
39
    {
40 6
        $this->merge($this->sanitize());
41 6
    }
42
43
    /**
44
     * Sanitize the inputs after the validation.
45
     *
46
     * @return array
47
     */
48
    protected function sanitize()
49
    {
50
        return [
51
            //
52
        ];
53
    }
54
}
55