Skip to content

Commit cfd3aa2

Browse files
committed
chore: add getter and setter for nodeValue
1 parent 8c2643d commit cfd3aa2

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

docs/phpmd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ Issues detected: 76
137137

138138
Issues detected: 8
139139

140-
Sat Jul 12 11:34:24 AM CEST 2025
140+
Sat Jul 12 01:57:19 PM CEST 2025

src/Trait/NativePropertiesTrait.php

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,43 @@ public function getTextContent(): ?string
2525
return $this->textContent;
2626
}
2727

28+
/**
29+
* @description get the inner html of the element, can be a string or HTML string
30+
*/
2831
public function getInnerHTML(): string
2932
{
3033
return $this->innerHTML;
3134
}
3235

36+
/**
37+
* @description set the inner html of the element, can be a string or HTML string
38+
*/
3339
public function setInnerHTML(string $innerHTML): static
3440
{
3541
$this->innerHTML = $innerHTML;
3642
return $this;
3743
}
3844

39-
/** access seems restricted, at least in body element
45+
/**
46+
* @description get the inner html of the element, can be a string or HTML string
47+
*/
48+
public function getNodeValue(): string
49+
{
50+
return $this->nodeValue;
51+
}
52+
53+
/**
54+
* @description set the inner html of the element, can be a string or HTML string
55+
*/
56+
public function setNodeValue(string $nodeValue): static
57+
{
58+
$this->nodeValue = $nodeValue;
59+
return $this;
4060
}
41-
**/
61+
62+
/**
63+
* access seems restricted, at least in body element *
64+
*/
4265
public function getSubstitutedNodeValue(): string
4366
{
4467
return $this->substitutedNodeValue;

0 commit comments

Comments
 (0)