TreeAwareTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTree() 0 4 1
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
}