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

ImportForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 13 1
1
<?php namespace Distilleries\Expendable\Http\Forms\Import;
2
3
use Distilleries\Expendable\Helpers\StaticLabel;
4
use Distilleries\FormBuilder\FormValidator;
5
6
class ImportForm extends FormValidator {
7
8
    public static $rules = [
9
        'file' => 'required'
10
    ];
11
12
    public static $rules_update = null;
13
14
    // ------------------------------------------------------------------------------------------------
15
16
    public function buildForm()
17
    {
18
19
        $this
20
            ->add('file', 'upload',
21
                [
22
                    'label'      => trans('expendable::form.file_import'),
23
                    'validation' => 'required',
24
                    'extensions' => 'csv,xls,xlsx',
25
                    'view'       => 'files',
26
                ])
27
            ->addDefaultActions();
28
    }
29
}