Code Duplication    Length = 12-12 lines in 2 locations

src/Traits/EntityManager.php 2 locations

@@ 34-45 (lines=12) @@
31
     * @param array $data
32
     * @return mixed
33
     */
34
    public function generateField(array $data = [])
35
    {
36
        return $this->execute('Hechoenlaravel\JarvisFoundation\FieldGenerator\CreateFieldCommand',
37
            'Hechoenlaravel\JarvisFoundation\FieldGenerator\Handler\CreateFieldCommandHandler', $data, [
38
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\FieldGeneratorValidator',
39
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\FieldTypeValidator',
40
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\FieldOrderSetter',
41
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\CreateTheFieldSlug',
42
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\CallPreAssignEventOnField',
43
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\FieldOptionsSerializer',
44
            ]);
45
    }
46
47
    /**
48
     * Edit a field
@@ 52-63 (lines=12) @@
49
     * @param array $data
50
     * @return mixed
51
     */
52
    public function editField(array $data = [])
53
    {
54
        return $this->execute('Hechoenlaravel\JarvisFoundation\FieldGenerator\EditFieldCommand',
55
            'Hechoenlaravel\JarvisFoundation\FieldGenerator\Handler\EditFieldCommandHandler', $data, [
56
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\EditFieldTypeValidator',
57
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\CreateTheFieldSlug',
58
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\SetFieldTypeOnEdit',
59
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\SetCommandDataFromEditFieldModel',
60
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\CallPreAssignEventOnField',
61
                'Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware\FieldOptionsSerializer',
62
            ]);
63
    }
64
65
    /**
66
     * Delete a Field