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/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
}

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

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

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

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