Completed
Pull Request — master (#91)
by Glenn
02:47
created

BackupSettingValidator::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 10
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Requests;
4
5
use App\Http\Requests\Request;
6
7
class BackupSettingValidator extends Request
8
{
9
    /**
10
     * Determine if the user is authorized to make this request.
11
     *
12
     * @return bool
13
     */
14
    public function authorize()
15
    {
16
        return true;
17
    }
18
19
    /**
20
     * Get the validation rules that apply to the request.
21
     *
22
     * @return array
23
     */
24
    public function rules()
25
    {
26
        return [
27
            'keepAllBackupsForDaysAll'   => 'required|integer',
28
            'keepAllBackupsForDays'      => 'required|integer',
29
            'keepWeeklyBackupsForWeeks'  => 'required|integer',
30
            'keepMonthlyBackupsForWeeks' => 'required|integer',
31
            'keepAllBackupsYearly'       => 'required|integer',
32
        ];
33
    }
34
}
35