Code Duplication    Length = 6-6 lines in 2 locations

src/Surfnet/StepupRa/RaBundle/Controller/Vetting/SmsController.php 1 location

@@ 118-123 (lines=6) @@
115
116
        /** @var SubmitButton $cancelButton */
117
        $cancelButton = $form->get('cancel');
118
        if ($cancelButton->isClicked()) {
119
            $this->getVettingService()->cancelProcedure($procedureId);
120
            $this->addFlash('info', $this->get('translator')->trans('ra.vetting.flash.cancelled'));
121
122
            return $this->redirectToRoute('ra_vetting_search');
123
        }
124
125
        if (!$form->isValid()) {
126
            $logger->notice(

src/Surfnet/StepupRa/RaBundle/Controller/VettingController.php 1 location

@@ 208-213 (lines=6) @@
205
206
        /** @var SubmitButton $cancelButton */
207
        $cancelButton = $form->get('cancel');
208
        if ($cancelButton->isClicked()) {
209
            $this->getVettingService()->cancelProcedure($procedureId);
210
            $this->addFlash('info', $this->get('translator')->trans('ra.vetting.flash.cancelled'));
211
212
            return $this->redirectToRoute('ra_vetting_search');
213
        }
214
215
        $vettingService = $this->getVettingService();
216
        $commonName = $vettingService->getIdentityCommonName($procedureId);