Code Duplication    Length = 12-14 lines in 5 locations

src/AppBundle/Controller/Admin/CategoryController.php 1 location

@@ 111-124 (lines=14) @@
108
    /**
109
     * @return \Symfony\Component\Form\Form
110
     */
111
    private function createFormDelete($id)
112
    {
113
        return $this->createFormBuilder()
114
            ->setAction($this->generateUrl('remove_category', ['id' => $id]))
115
            ->setMethod('DELETE')
116
            ->add('submit', SubmitType::class, [
117
                'label' => ' ',
118
                'attr' => [
119
                    'class' => 'glyphicon glyphicon-remove btn-link',
120
                    'onclick' => 'return confirm("Are you sure?")'
121
                ]
122
            ])
123
            ->getForm();
124
    }
125
}
126
127

src/AppBundle/Controller/Admin/ModuleController.php 1 location

@@ 109-122 (lines=14) @@
106
    /**
107
     * @return \Symfony\Component\Form\Form
108
     */
109
    private function createFormDelete($id)
110
    {
111
        return $this->createFormBuilder()
112
            ->setAction($this->generateUrl('remove_module', ['id' => $id]))
113
            ->setMethod('DELETE')
114
            ->add('submit', SubmitType::class, [
115
                'label' => ' ',
116
                'attr' => [
117
                    'class' => 'glyphicon glyphicon-remove btn-link',
118
                    'onclick' => 'return confirm("Are you sure?")'
119
                ]
120
            ])
121
            ->getForm();
122
    }
123
}
124

src/AppBundle/Controller/Admin/ModuleUserController.php 1 location

@@ 82-95 (lines=14) @@
79
    /**
80
     * @return \Symfony\Component\Form\Form
81
     */
82
    private function createFormDelete($idUser, $idModule)
83
    {
84
        return $this->createFormBuilder()
85
            ->setAction($this->generateUrl('remove_moduleUser', ['idUser' => $idUser, 'idModule' => $idModule]))
86
            ->setMethod('DELETE')
87
            ->add('submit', SubmitType::class, [
88
                'label' => ' ',
89
                'attr' => [
90
                    'class' => 'glyphicon glyphicon-remove btn-link',
91
                    'onclick' => 'return confirm("Are you sure?")'
92
                ]
93
            ])
94
            ->getForm();
95
    }
96
}
97

src/AppBundle/Controller/Admin/QuestionController.php 1 location

@@ 134-147 (lines=14) @@
131
    /**
132
     * @return \Symfony\Component\Form\Form
133
     */
134
    private function createFormDelete($id, $idModule)
135
    {
136
        return $this->createFormBuilder()
137
            ->setAction($this->generateUrl('remove_question', ['id' => $id, 'idModule' => $idModule]))
138
            ->setMethod('DELETE')
139
            ->add('submit', SubmitType::class, [
140
                'label' => ' ',
141
                'attr' => [
142
                    'class' => 'glyphicon glyphicon-remove btn-link',
143
                    'onclick' => 'return confirm("Are you sure?")'
144
                ]
145
            ])
146
            ->getForm();
147
    }
148
149
}
150

src/AppBundle/Controller/Admin/UserController.php 1 location

@@ 97-108 (lines=12) @@
94
     *
95
     * @return \Symfony\Component\Form\Form The form
96
     */
97
    private function createFormDelete($id)
98
    {
99
        return $this->createFormBuilder()
100
            ->setAction($this->generateUrl('user_delete', ['id' => $id]))
101
            ->setMethod('DELETE')
102
            ->add('submit', SubmitType::class, ['label' => ' ',
103
                'attr' => [
104
                    'class' => 'glyphicon glyphicon-remove btn-link',
105
                    'onclick' => 'return confirm("Are you sure?")'
106
                ]])
107
            ->getForm();
108
    }
109
}