Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"paquettg/string-encode": "~1.0.0",
"php-http/httplug": "^2.1",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/psr7": "^1.6",
"guzzlehttp/psr7": "^1.6|^2.0",
"myclabs/php-enum": "^1.7"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/Dom/Node/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function offsetUnset($offset): void
*
* @return mixed
*/
public function offsetGet($offset)
public function offsetGet($offset): mixed
{
return $this->collection[$offset] ?? null;
}
Expand Down
10 changes: 10 additions & 0 deletions src/PHPHtmlParser/Dom/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ public function name(): string
return $this->name;
}

/**
* Sets the name of this tag.
*/
public function setName(string $name): Tag
{
$this->name = $name;

return clone $this;
}

/**
* Sets the tag to be self closing.
*/
Expand Down