Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | private function toSignedXML(XMLSecurityKey $signingKey, array $certificates, DOMNode $insertBefore = null): DOMElement |
||
32 | { |
||
33 | $root = $this->toXML(); |
||
|
|||
34 | |||
35 | if ($insertBefore !== null) { |
||
36 | XMLSecurityUtils::insertSignature($signingKey, $certificates, $root, $insertBefore); |
||
37 | $doc = clone $root->ownerDocument; |
||
38 | } else { |
||
39 | $signature = new Signature($signingKey->getAlgorithm(), $certificates, $signingKey); |
||
40 | $signature->toXML($root); |
||
41 | } |
||
42 | |||
43 | return $root; |
||
44 | } |
||
46 |