TreeAwareTrait::getTree()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Phoole (PHP7.2+)
5
 *
6
 * @category  Library
7
 * @package   Phoole\Base
8
 * @copyright Copyright (c) 2019 Hong Zhang
9
 */
10
declare(strict_types=1);
11
12
namespace Phoole\Base\Tree;
13
14
/**
15
 * TreeAwareTrait
16
 *
17
 * @package Phoole\Base
18
 */
19
trait TreeAwareTrait
20
{
21
    /**
22
     * @var TreeInterface
23
     */
24
    protected $tree;
25
26
    /**
27
     * @return TreeInterface
28
     */
29
    public function getTree(): TreeInterface
30
    {
31
        return $this->tree;
32
    }
33
}