Code Duplication    Length = 10-11 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Saml/AssertionSigningService.php 1 location

@@ 55-65 (lines=11) @@
52
    /**
53
     * @return XMLSecurityKey
54
     */
55
    private function loadPrivateKey()
56
    {
57
        $key        = $this->identityProvider->getPrivateKey(PrivateKey::NAME_DEFAULT);
58
        $keyLoader  = new PrivateKeyLoader();
59
        $privateKey = $keyLoader->loadPrivateKey($key);
60
61
        $xmlSecurityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']);
62
        $xmlSecurityKey->loadKey($privateKey->getKeyAsString());
63
64
        return $xmlSecurityKey;
65
    }
66
67
    /**
68
     * @return string

tests/features/bootstrap/ServiceProviderContext.php 1 location

@@ 226-235 (lines=10) @@
223
        return $ip;
224
    }
225
226
    private static function loadPrivateKey(PrivateKey $key)
227
    {
228
        $keyLoader = new PrivateKeyLoader();
229
        $privateKey = $keyLoader->loadPrivateKey($key);
230
231
        $key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']);
232
        $key->loadKey($privateKey->getKeyAsString());
233
234
        return $key;
235
    }
236
237
    private function getSession()
238
    {