AbstractNode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getParent() 0 3 1
1
<?php
2
/**
3
 * (c) Steve Nebes <[email protected]>.
4
 *
5
 *  For the full copyright and license information, please view the LICENSE
6
 *  file that was distributed with this source code.
7
 */
8
9
namespace SN\HtmlSanitizer\Node;
10
11
/**
12
 * @author Steve Nebes <[email protected]>
13
 */
14
abstract class AbstractNode implements NodeInterface
15
{
16
    /**
17
     * @var NodeInterface
18
     */
19
    private $parent;
20
21 17
    public function __construct(NodeInterface $parent)
22
    {
23 17
        $this->parent = $parent;
24 17
    }
25
26 4
    public function getParent(): ?NodeInterface
27
    {
28 4
        return $this->parent;
29
    }
30
}
31