Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 42-48 (lines=7) @@
39
40
        $profile = $this->getProfileService()->findByIdentityId($identity->id);
41
42
        if ($this->isGranted('ROLE_SRAA')) {
43
            $institution = $identity->institution;
44
            $choices = $this->getInstitutionListingService()->getAll();
45
        } else {
46
            $choices = $profile->getRaaInstitutions();
47
            $institution = reset($choices);
48
        }
49
50
        // Only show the form if more than one institutions where found.
51
        if (count($choices) > 1) {

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

@@ 60-66 (lines=7) @@
57
58
        $profile = $this->getProfileService()->findByIdentityId($identity->id);
59
60
        if ($this->isGranted('ROLE_SRAA')) {
61
            $institution = $identity->institution;
62
            $choices = $this->getInstitutionListingService()->getAll();
63
        } else {
64
            $choices = $profile->getRaaInstitutions();
65
            $institution = reset($choices);
66
        }
67
68
        if (in_array($institutionParameter, $choices)) {
69
            $institution = $institutionParameter;