src/Algorithm/Traversal/InOrder.php
public function _traverse(?IBinaryNode $node) {
        if (null !== $node) {
            if (null !== $node->getLeft()) {
                $this->_traverse($node->getLeft());
            }
            parent::visit($node->getValue());
            if (null !== $node->getRight()) {
                $this->_traverse($node->getRight());
            }
        }
    }
public function _traverse(?IBinaryNode $node) {
        if (null !== $node) {
            if (null !== $node->getLeft()) {
                $this->_traverse($node->getLeft());
            }
            parent::visit($node->getValue());
            if (null !== $node->getRight()) {
                $this->_traverse($node->getRight());
            }
        }
    }
public function _traverse ( ? IBinaryNode $ node ) { if ( null !== $ node ) { if ( null !== $ node -> getLeft ( ) ) { $ this -> _traverse ( $ node -> getLeft ( ) ) ; } parent :: visit ( $ node -> getValue ( ) ) ; if ( null !== $ node -> getRight ( ) ) { $ this -> _traverse ( $ node -> getRight ( ) ) ; } } }
helper method for traversing

@param IBinaryNode|null $node
helper method for traversing