Completed
Push — master ( 188ffb...31684b )
by Maxime
02:48
created

ExportForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 29
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 17 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
    public function buildForm()
18
    {
19
20
        $this
21
            ->add('range', 'datepicker',
22
                [
23
                    'label'      => trans('expendable::form.date'),
24
                    'validation' => 'required',
25
                    'range'      => true
26
                ])
27
            ->add('type', 'choice', [
28
                'choices'    => StaticLabel::typeExport(),
29
                'validation' => 'required',
30
                'label'      => trans('expendable::form.type')
31
            ])
32
            ->addDefaultActions();
33
    }
34
}