Tree::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
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