Tree   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 53
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A endLine() 0 3 1
A nodes() 0 3 1
A __construct() 0 5 1
A startLine() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Pluswerk\TypoScriptAutoFixer\Fixer\NestingConsistency;
5
6
final class Tree
7
{
8
    /**
9
     * @var NodeCollection
10
     */
11
    private $nodes;
12
13
    /**
14
     * @var int
15
     */
16
    private $startLine;
17
18
    /**
19
     * @var int
20
     */
21
    private $endLine;
22
23
    /**
24
     * Tree constructor.
25
     *
26
     * @param NodeCollection $nodes
27
     * @param int            $startLine
28
     * @param int            $endLine
29
     */
30
    public function __construct(NodeCollection $nodes, int $startLine, int $endLine)
31
    {
32
        $this->nodes = $nodes;
33
        $this->startLine = $startLine;
34
        $this->endLine = $endLine;
35
    }
36
37
    /**
38
     * @return NodeCollection
39
     */
40
    public function nodes(): NodeCollection
41
    {
42
        return $this->nodes;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function startLine(): int
49
    {
50
        return $this->startLine;
51
    }
52
53
    /**
54
     * @return int
55
     */
56
    public function endLine(): int
57
    {
58
        return $this->endLine;
59
    }
60
}
61