RootTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
eloc 3
c 2
b 1
f 0
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRoot() 0 3 1
1
<?php
2
/**
3
 * Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
4
 * Copyright (c) 2017–2019 Contributors.
5
 *
6
 * http://opensource.org/licenses/Apache2.0
7
 */
8
9
declare(strict_types=1);
10
11
namespace SimplePie\Mixin;
12
13
/**
14
 * Shared code for working with elements which manage the tree root.
15
 */
16
trait RootTrait
17
{
18
    /**
19
     * The root-most node in the feed.
20
     *
21
     * @var object
22
     */
23
    protected $root;
24
25
    /**
26
     * Retrieve the root-most node in the feed.
27
     */
28 560
    public function getRoot(): object
29
    {
30 560
        return $this->root;
31
    }
32
}
33