Code Duplication    Length = 20-20 lines in 3 locations

src/Distilleries/Expendable/States/ExportStateTrait.php 1 location

@@ 13-32 (lines=20) @@
10
    // ------------------------------------------------------------------------------------------------
11
    // ------------------------------------------------------------------------------------------------
12
13
    public function getExport()
14
    {
15
        $form = FormBuilder::create($this->export_form, [
16
            'model' => $this->model
17
        ]);
18
19
        $form_content = view('expendable::admin.form.components.formgenerator.export', [
20
            'form' => $form
21
        ]);
22
        $content      = view('expendable::admin.form.state.form', [
23
24
        ]);
25
26
        $this->layoutManager->add([
27
            'form'=>$form_content,
28
            'content'=>$content,
29
        ]);
30
31
        return $this->layoutManager->render();
32
    }
33
34
    // ------------------------------------------------------------------------------------------------
35

src/Distilleries/Expendable/States/ImportStateTrait.php 1 location

@@ 15-34 (lines=20) @@
12
    // ------------------------------------------------------------------------------------------------
13
    // ------------------------------------------------------------------------------------------------
14
15
    public function getImport()
16
    {
17
        $form = FormBuilder::create($this->import_form, [
18
            'model' => $this->model
19
        ]);
20
21
        $form_content = view('expendable::admin.form.components.formgenerator.import', [
22
            'form' => $form
23
        ]);
24
        $content      = view('expendable::admin.form.state.form', [
25
26
        ]);
27
28
        $this->layoutManager->add([
29
        'form'=>$form_content,
30
        'content'=>$content,
31
        ]);
32
33
        return $this->layoutManager->render();
34
    }
35
36
    // ------------------------------------------------------------------------------------------------
37

src/Distilleries/Expendable/Http/Controllers/Backend/ComponentController.php 1 location

@@ 39-58 (lines=20) @@
36
    // ------------------------------------------------------------------------------------------------
37
    // ------------------------------------------------------------------------------------------------
38
39
    public function getEdit($id = '')
40
    {
41
42
        $form = FormBuilder::create(get_class($this->form));
43
44
45
        $form_content = view('form-builder::form.components.formgenerator.full', [
46
            'form' => $form
47
        ]);
48
        $content      = view('expendable::admin.form.state.form', [
49
50
        ]);
51
52
        $this->layoutManager->add([
53
            'form'    => $form_content,
54
            'content' => $content,
55
        ]);
56
57
        return $this->layoutManager->render();
58
    }
59
60
    // ------------------------------------------------------------------------------------------------
61