ExportForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 15
dl 0
loc 27
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 16 1
1
<?php namespace Distilleries\Expendable\Http\Forms\Export;
2
3
use Distilleries\Expendable\Helpers\StaticLabel;
4
use Distilleries\FormBuilder\FormValidator;
5
6
class ExportForm extends FormValidator {
7
8
    public static $rules = [
9
        'range' => 'required',
10
        'type'  => 'required'
11
    ];
12
13
    public static $rules_update = null;
14
15
    // ------------------------------------------------------------------------------------------------
16
17 14
    public function buildForm()
18
    {
19
20
        $this
21 14
            ->add('range', 'datepicker',
22
                [
23 14
                    'label'      => trans('expendable::form.date'),
24 14
                    'validation' => 'required',
25
                    'range'      => true
26
                ])
27 14
            ->add('type', 'choice', [
28 14
                'choices'    => StaticLabel::typeExport(),
29 14
                'validation' => 'required',
30 14
                'label'      => trans('expendable::form.type')
31
            ])
32 14
            ->addDefaultActions();
33
    }
34
}