Total Complexity | 8 |
Total Lines | 79 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | class LastCommonParentResult |
||
19 | { |
||
20 | /** @var TagNode */ |
||
21 | private $parent; |
||
22 | |||
23 | /** @var bool */ |
||
24 | private $splittingNeeded = false; |
||
25 | |||
26 | /** @var int */ |
||
27 | private $lastCommonParentDepth = -1; |
||
28 | |||
29 | /** @var int */ |
||
30 | private $indexInLastCommonParent = -1; |
||
31 | |||
32 | /** |
||
33 | * @return TagNode|null |
||
34 | */ |
||
35 | 10 | public function getLastCommonParent(): ?TagNode |
|
36 | { |
||
37 | 10 | return $this->parent; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param TagNode $value |
||
42 | * @return void |
||
43 | */ |
||
44 | 10 | public function setLastCommonParent(?TagNode $value): void |
|
45 | { |
||
46 | 10 | $this->parent = $value; |
|
47 | 10 | } |
|
48 | |||
49 | /** |
||
50 | * @return bool |
||
51 | */ |
||
52 | 9 | public function isSplittingNeeded(): bool |
|
53 | { |
||
54 | 9 | return $this->splittingNeeded; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return void |
||
59 | */ |
||
60 | 5 | public function setSplittingNeeded(): void |
|
61 | { |
||
62 | 5 | $this->splittingNeeded = true; |
|
63 | 5 | } |
|
64 | |||
65 | /** |
||
66 | * @return int |
||
67 | */ |
||
68 | 10 | public function getLastCommonParentDepth(): int |
|
69 | { |
||
70 | 10 | return $this->lastCommonParentDepth; |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * @param int $value |
||
75 | * @return void |
||
76 | */ |
||
77 | 10 | public function setLastCommonParentDepth(int $value): void |
|
78 | { |
||
79 | 10 | $this->lastCommonParentDepth = $value; |
|
80 | 10 | } |
|
81 | |||
82 | /** |
||
83 | * @return int |
||
84 | */ |
||
85 | 10 | public function getIndexInLastCommonParent(): int |
|
88 | } |
||
89 | |||
90 | /** |
||
91 | * @param int $value |
||
92 | * @return void |
||
93 | */ |
||
94 | 10 | public function setIndexInLastCommonParent(int $value): void |
|
97 | 10 | } |
|
98 | } |
||
99 |