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