Completed
Push — master ( fb3943...fbbc4e )
by Edgar
04:02
created

DOMWrapper::createElementNS()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 2
1
<?php
2
namespace nstdio\svg\xml;
3
4
use DOMDocument;
5
use nstdio\svg\Base;
6
7
/**
8
 * Class DomWrapper
9
 *
10
 * @package nstdio\svg\xml
11
 * @author  Edgar Asatryan <[email protected]>
12
 */
13
final class DOMWrapper extends DOMNode
14
{
15
    /**
16
     * @var DOMDocument
17
     */
18
    private $dom;
19
20
    /**
21
     * DOMWrapper constructor.
22
     */
23 149
    public function __construct()
24
    {
25 149
        $this->dom = new DOMDocument(Base::DOM_VERSION, Base::DOM_ENCODING);
26 149
        $this->dom->xmlStandalone = false;
27 149
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32 2
    public function saveXML($formatOutput = false)
33
    {
34 2
        $this->dom->formatOutput = (bool) $formatOutput;
35
36 2
        return trim(parent::saveXML($formatOutput));
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42 149
    public function getElement()
43
    {
44 149
        return $this->dom;
45
    }
46
47
    /**
48
     * @inheritdoc
49
     */
50
    public function setNodeValue($value)
51
    {
52
        throw NotImplementedException::newInstance();
53
    }
54
55
    /**
56
     * @inheritdoc
57
     */
58
    public function getNodeValue()
59
    {
60
        throw NotImplementedException::newInstance();
61
    }
62
}