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

@@ 242-251 (lines=10) @@
239
        return $ip;
240
    }
241
242
    private static function loadPrivateKey(PrivateKey $key)
243
    {
244
        $keyLoader = new PrivateKeyLoader();
245
        $privateKey = $keyLoader->loadPrivateKey($key);
246
247
        $key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']);
248
        $key->loadKey($privateKey->getKeyAsString());
249
250
        return $key;
251
    }
252
253
    private function getSession()
254
    {