Code Duplication    Length = 11-11 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Service/SamlEntityService.php 2 locations

@@ 55-65 (lines=11) @@
52
     * @param string $entityId
53
     * @return IdentityProvider
54
     */
55
    public function getIdentityProvider($entityId)
56
    {
57
        if (!array_key_exists($entityId, $this->loadedIdentityProviders) && !$this->hasIdentityProvider($entityId)) {
58
            throw new RuntimeException(sprintf(
59
                'Failed at attempting to load unknown IdentityProvider with EntityId "%s"',
60
                $entityId
61
            ));
62
        }
63
64
        return $this->loadedIdentityProviders[$entityId];
65
    }
66
67
    /**
68
     * @param string $entityId
@@ 89-99 (lines=11) @@
86
     * @param string $entityId
87
     * @return ServiceProvider
88
     */
89
    public function getServiceProvider($entityId)
90
    {
91
        if (!array_key_exists($entityId, $this->loadedServiceProviders) && !$this->hasServiceProvider($entityId)) {
92
            throw new RuntimeException(sprintf(
93
                'Failed at attempting to load unknown ServiceProvider with EntityId "%s"',
94
                $entityId
95
            ));
96
        }
97
98
        return $this->loadedServiceProviders[$entityId];
99
    }
100
101
    /**
102
     * @param string $entityId