| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| 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 | $doc = clone $root->ownerDocument; |
||
| 38 | } else { |
||
| 39 | $signature = new Signature($this->signingKey->getAlgorithm(), $this->certificates, $this->signingKey); |
||
| 40 | $signature->toXML($root); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $root; |
||
| 44 | } |
||
| 46 |