Code Duplication    Length = 7-9 lines in 3 locations

src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.php 1 location

@@ 46-54 (lines=9) @@
43
     */
44
    private $roleRequirements;
45
46
    public function __construct(
47
        IdentityService $identityService
48
    ) {
49
        $this->identityService = $identityService;
50
51
        $this->roleRequirements = new InstitutionRoleSet(
52
            [new InstitutionRole(InstitutionRole::ROLE_USE_RA), new InstitutionRole(InstitutionRole::ROLE_USE_RAA)]
53
        );
54
    }
55
56
    public function getAction($id)
57
    {

src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php 1 location

@@ 44-51 (lines=8) @@
41
     */
42
    private $roleRequirements;
43
44
    public function __construct(RaSecondFactorService $raSecondFactorService)
45
    {
46
        $this->raSecondFactorService = $raSecondFactorService;
47
48
        $this->roleRequirements = new InstitutionRoleSet(
49
            [new InstitutionRole(InstitutionRole::ROLE_USE_RA), new InstitutionRole(InstitutionRole::ROLE_USE_RAA)]
50
        );
51
    }
52
53
    public function collectionAction(Request $request, Institution $actorInstitution)
54
    {

src/Surfnet/StepupMiddleware/ApiBundle/Controller/ProfileController.php 1 location

@@ 42-48 (lines=7) @@
39
     */
40
    private $roleRequirements;
41
42
    public function __construct(ProfileService $profileService)
43
    {
44
        $this->profileService = $profileService;
45
        $this->roleRequirements = new InstitutionRoleSet(
46
            [new InstitutionRole(InstitutionRole::ROLE_USE_RA), new InstitutionRole(InstitutionRole::ROLE_USE_RAA)]
47
        );
48
    }
49
50
    public function getAction(Request $request, $identityId)
51
    {