Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()

From: Date: Sun, 21 Jul 2024 11:24:28 +0000
Subject: Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi internals

I opened a PR to add the getNextSibling() and getPreviousSibling() methods to the tidyNode class.
As the class is final, this has no BC break concerns.

The reason for adding this is that it's inconvenient to walk the tree solely using the existing
getParent() method and ->child property.
Since it's a tree anyway, methods to obtain the previous or next sibling are natural en
convenient.

Just sending this mail to see if anyone objects to this.
PR link: https://github.com/php/php-src/pull/15047

Kind regards
Niels


Thread (2 messages)

« previous php.internals (#124530) next »