GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 30-34 lines in 2 locations

src/AppBundle/Controller/LearningOutcomeController.php 1 location

@@ 128-161 (lines=34) @@
125
    /**
126
     * @Route("/resultado/eliminar/{id}", name="admin_program_learning_outcome_delete", methods={"GET", "POST"}, requirements={"id": "\d+"})
127
     */
128
    public function learningOutcomeDeleteAction(LearningOutcome $learningOutcome, Request $request)
129
    {
130
        if ('POST' === $request->getMethod() && $request->request->has('delete')) {
131
132
            // Eliminar el resultado de aprendizaje de la base de datos
133
            $this->getDoctrine()->getManager()->remove($learningOutcome);
134
            try {
135
                $this->getDoctrine()->getManager()->flush();
136
                $this->addFlash('success', $this->get('translator')->trans('alert.learning_outcome.deleted', [], 'activity'));
137
            } catch (\Exception $e) {
138
                $this->addFlash('error', $this->get('translator')->trans('alert.learning_outcome.not_deleted', [], 'activity'));
139
            }
140
            return $this->redirectToRoute('admin_program_training_learning_outcomes', ['id' => $learningOutcome->getTraining()->getId()]);
141
        }
142
143
        $title = (string) $learningOutcome->getName();
144
145
        $breadcrumb = [
146
            ['fixed' => $learningOutcome->getTraining()->getName(), 'path' => 'admin_program_training_learning_outcomes', 'options' => ['id' => $learningOutcome->getTraining()->getId()]],
147
            [
148
                'fixed' => $title,
149
                'path' => 'admin_program_learning_outcome_form',
150
                'options' => ['id' => $learningOutcome->getId()]
151
            ],
152
            ['caption' => 'menu.delete']
153
        ];
154
155
        return $this->render('activity/delete_learning_outcome.html.twig', [
156
            'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('admin_program'),
157
            'breadcrumb' => $breadcrumb,
158
            'title' => $title,
159
            'element' => $learningOutcome
160
        ]);
161
    }
162
}
163

src/AppBundle/Controller/TrackingController.php 1 location

@@ 269-298 (lines=30) @@
266
     * @Route("/seguimiento/acuerdo/eliminar/{id}", name="admin_group_student_agreement_delete", methods={"GET", "POST"})
267
     * @Security("is_granted('AGREEMENT_MANAGE', agreement)")
268
     */
269
    public function agreementDeleteAction(Agreement $agreement, Request $request)
270
    {
271
        $student = $agreement->getStudent();
272
273
        if ('POST' === $request->getMethod() && $request->request->has('delete')) {
274
275
            // Eliminar el acuerdo de la base de datos
276
            $this->getDoctrine()->getManager()->getRepository('AppBundle:Agreement')->delete($agreement);
277
            try {
278
                $this->getDoctrine()->getManager()->flush();
279
                $this->addFlash('success', $this->get('translator')->trans('alert.agreement_deleted', [], 'group'));
280
            } catch (\Exception $e) {
281
                $this->addFlash('error', $this->get('translator')->trans('alert.agreement_not_deleted', [], 'group'));
282
            }
283
            return $this->redirectToRoute('admin_group_student_agreements', ['id' => $student->getId()]);
284
        }
285
286
        $title = (string) $agreement->getWorkcenter();
287
288
        return $this->render('group/delete_agreement.html.twig', [
289
            'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('admin_tutor_group'),
290
            'breadcrumb' => [
291
                ['fixed' => $student->getStudentGroup()->getName(), 'path' => 'admin_group_students', 'options' => ['id' => $student->getStudentGroup()->getId()]],
292
                ['fixed' => (string) $student, 'path' => 'admin_group_student_agreements', 'options' => ['id' => $student->getId()]],
293
                ['fixed' => $title]
294
            ],
295
            'title' => $title,
296
            'agreement' => $agreement
297
        ]);
298
    }
299
300
    /**
301
     * @Route("/seguimiento/acuerdo/estudiante/{id}", name="admin_group_student_agreement_student_info", methods={"GET"})