Code Duplication    Length = 3-4 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Controller/SecondFactorController.php 2 locations

@@ 333-336 (lines=4) @@
330
        $form = $this->createForm(VerifyYubikeyOtpType::class, $command)->handleRequest($request);
331
        $cancelForm = $this->buildCancelAuthenticationForm()->handleRequest($request);
332
333
        if ($form->isSubmitted() && !$form->isValid()) {
334
            // OTP field is rendered empty in the template.
335
            return ['form' => $form->createView(), 'cancelForm' => $cancelForm->createView()];
336
        }
337
338
        $result = $this->getStepupService()->verifyYubikeyOtp($command);
339
@@ 437-439 (lines=3) @@
434
        $form = $this->createForm(VerifySmsChallengeType::class, $command)->handleRequest($request);
435
        $cancelForm = $this->buildCancelAuthenticationForm()->handleRequest($request);
436
437
        if ($form->isSubmitted() && !$form->isValid()) {
438
            return ['form' => $form->createView(), 'cancelForm' => $cancelForm->createView()];
439
        }
440
441
        $logger->notice('Verifying input SMS challenge matches');
442