RootTrait::getRoot()   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 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
 * 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