Passed
Push — develop ( f7ed9e...68fe11 )
by Mikaël
01:31
created

DomDocumentHandler::getRootElement()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WsdlToPhp\DomHandler;
6
7
class DomDocumentHandler extends AbstractDomDocumentHandler
8
{
9 16
    public function getRootElement(): ?ElementHandler
10
    {
11 16
        return $this->rootElement;
12
    }
13
14 44
    protected function getNodeHandler(\DOMNode $node, AbstractDomDocumentHandler $domDocument, int $index = -1): NodeHandler
15
    {
16 44
        return new NodeHandler($node, $domDocument, $index);
17
    }
18
19 78
    protected function getElementHandler(\DOMElement $element, AbstractDomDocumentHandler $domDocument, int $index = -1): ElementHandler
20
    {
21 78
        return new ElementHandler($element, $domDocument, $index);
22
    }
23
24 46
    protected function getAttributeHandler(\DOMAttr $attribute, AbstractDomDocumentHandler $domDocument, int $index = -1): AttributeHandler
25
    {
26 46
        return new AttributeHandler($attribute, $domDocument, $index);
27
    }
28
}
29