Code Duplication    Length = 10-10 lines in 2 locations

src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php 2 locations

@@ 41-50 (lines=10) @@
38
        $this->raSecondFactorService = $raSecondFactorService;
39
    }
40
41
    public function collectionAction(Request $request, Institution $institution)
42
    {
43
        $this->denyAccessUnlessGranted(['ROLE_RA']);
44
45
        $query = $this->buildRaSecondFactorQuery($request, $institution);
46
47
        $paginator = $this->raSecondFactorService->search($query);
48
49
        return JsonCollectionResponse::fromPaginator($paginator);
50
    }
51
52
    public function exportAction(Request $request, Institution $institution)
53
    {
@@ 52-61 (lines=10) @@
49
        return JsonCollectionResponse::fromPaginator($paginator);
50
    }
51
52
    public function exportAction(Request $request, Institution $institution)
53
    {
54
        $this->denyAccessUnlessGranted(['ROLE_RA']);
55
56
        $query = $this->buildRaSecondFactorQuery($request, $institution);
57
58
        $results = $this->raSecondFactorService->searchUnpaginated($query);
59
60
        return new JsonResponse($results);
61
    }
62
63
    /**
64
     * @param Request $request