Total Complexity | 9 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class Document extends Node |
||
20 | { |
||
21 | /** @var int|null */ |
||
22 | protected $startLine; |
||
23 | |||
24 | /** @var int|null */ |
||
25 | protected $endLine; |
||
26 | |||
27 | public function __construct() |
||
28 | { |
||
29 | parent::__construct(); |
||
30 | $this->setStartLine(1); |
||
31 | } |
||
32 | |||
33 | protected function setParent(?Node $node = null): void |
||
40 | } |
||
41 | |||
42 | public function setStartLine(?int $startLine): void |
||
43 | { |
||
44 | $this->startLine = $startLine; |
||
45 | if ($this->endLine === null) { |
||
46 | $this->endLine = $startLine; |
||
47 | } |
||
48 | } |
||
49 | |||
50 | public function getStartLine(): ?int |
||
51 | { |
||
52 | return $this->startLine; |
||
53 | } |
||
54 | |||
55 | public function setEndLine(?int $endLine): void |
||
58 | } |
||
59 | |||
60 | public function getEndLine(): ?int |
||
61 | { |
||
65 |