AbstractNode::getParent()   A
last analyzed

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 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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