/**
  * Adds a child to this node.
  *
  * @param NodeInterface $child     - Child.
  * @param bool          $setParent - Set Parent?
  *
  * @throws \IronEdge\Component\Graphs\Exception\ChildTypeNotSupportedException
  *
  * @return NodeInterface
  */
 public function addChild(NodeInterface $child, bool $setParent = true) : NodeInterface
 {
     $ret = parent::addChild($child, $setParent);
     if ($child instanceof State && $child->isInitial()) {
         $this->addInitialState($child);
     }
     return $ret;
 }