Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
47 | 3 | protected function get_document() { |
|
48 | 3 | $document = new DOMDocument( parent::XML_VERSION, parent::XML_ENCODING ); |
|
49 | |||
50 | // We can't disable preserve white space and format the output |
||
51 | // this is causing 'Invalid electronic signature' errors. |
||
52 | 3 | $document->preserveWhiteSpace = true; |
|
53 | 3 | $document->formatOutput = true; |
|
54 | |||
55 | // Root. |
||
56 | 3 | $root = $document->createElement( $this->get_name() ); |
|
57 | |||
58 | 3 | $document->appendChild( $root ); |
|
59 | |||
60 | 3 | return $document; |
|
61 | } |
||
74 |