The hasChild() method checks if the specified node exists as a child of the target node. 
Description
public AbstractNode::hasChild(NodeInterface $node): boolParameters
node
The NodeInterface instance to check for in the list of child nodes.
Return Value
Returns true if the specified node is a child of the current node, false otherwise.
Exceptions
None
