Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 51-62 (lines=12) @@
48
        }
49
50
        // Only show the form if more than one institutions where found.
51
        if (count($choices) > 1) {
52
            $command = new SelectInstitutionCommand();
53
            $command->institution = $institution;
54
            $command->availableInstitutions = $choices;
55
56
            $form = $this->createForm(SelectInstitutionType::class, $command);
57
            $form->handleRequest($request);
58
59
            if ($form->isSubmitted() && $form->isValid()) {
60
                $institution = $command->institution;
61
            }
62
        }
63
64
        $logger->notice(sprintf('Opening the institution configuration for "%s"', $institution));
65

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

@@ 73-84 (lines=12) @@
70
        }
71
72
        // Only show the form if more than one institutions where found.
73
        if (count($choices) > 1) {
74
            $command = new SelectInstitutionCommand();
75
            $command->institution = $institution;
76
            $command->availableInstitutions = $choices;
77
78
            $form = $this->createForm(SelectInstitutionType::class, $command);
79
            $form->handleRequest($request);
80
81
            if ($form->isSubmitted() && $form->isValid()) {
82
                $institution = $command->institution;
83
            }
84
        }
85
86
87
        $command = new SearchRaLocationsCommand();