Code Duplication    Length = 21-24 lines in 2 locations

src/Surfnet/StepupMiddlewareClient/Configuration/Service/InstitutionWithPersonalRaLocationsService.php 1 location

@@ 7-27 (lines=21) @@
4
5
use Surfnet\StepupMiddlewareClient\Service\ApiService;
6
7
class InstitutionWithPersonalRaLocationsService
8
{
9
    /**
10
     * @var ApiService
11
     */
12
    private $apiService;
13
14
    public function __construct(ApiService $apiService)
15
    {
16
        $this->apiService = $apiService;
17
    }
18
19
    /**
20
     * @param string $institution
21
     * @return bool
22
     */
23
    public function institutionShowsRaLocations($institution)
24
    {
25
        return $this->apiService->read('/shows-ra-locations/%s', [$institution]);
26
    }
27
}
28

src/Surfnet/StepupMiddlewareClient/Identity/Service/RaService.php 1 location

@@ 23-46 (lines=24) @@
20
21
use Surfnet\StepupMiddlewareClient\Service\ApiService;
22
23
class RaService
24
{
25
    /**
26
     * @var ApiService
27
     */
28
    private $apiService;
29
30
    /**
31
     * @param ApiService $apiService
32
     */
33
    public function __construct(ApiService $apiService)
34
    {
35
        $this->apiService = $apiService;
36
    }
37
38
    /**
39
     * @param string $institution
40
     * @return array|null
41
     */
42
    public function listRas($institution)
43
    {
44
        return $this->apiService->read('registration-authority?institution=%s', [$institution]);
45
    }
46
}
47