Code Duplication    Length = 3-4 lines in 2 locations

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

@@ 338-341 (lines=4) @@
335
        $form = $this->createForm(VerifyYubikeyOtpType::class, $command)->handleRequest($request);
336
        $cancelForm = $this->buildCancelAuthenticationForm()->handleRequest($request);
337
338
        if ($form->isSubmitted() && !$form->isValid()) {
339
            // OTP field is rendered empty in the template.
340
            return ['form' => $form->createView(), 'cancelForm' => $cancelForm->createView()];
341
        }
342
343
        $result = $this->getStepupService()->verifyYubikeyOtp($command);
344
@@ 448-450 (lines=3) @@
445
        $form = $this->createForm(VerifySmsChallengeType::class, $command)->handleRequest($request);
446
        $cancelForm = $this->buildCancelAuthenticationForm()->handleRequest($request);
447
448
        if ($form->isSubmitted() && !$form->isValid()) {
449
            return ['form' => $form->createView(), 'cancelForm' => $cancelForm->createView()];
450
        }
451
452
        $logger->notice('Verifying input SMS challenge matches');
453