Code Duplication    Length = 7-7 lines in 2 locations

DataStructures/Trees/BinaryTreeAbstract.php 2 locations

@@ 153-159 (lines=7) @@
150
        } else {
151
            $node = $this->root;
152
            while($node !== null) {
153
                if($key < $node->key) {
154
                    $node = $node->left;
155
                } else if($key > $node->key) {
156
                    $node = $node->right;
157
                } else {
158
                    return true;
159
                }
160
            }
161
        }
162
@@ 399-405 (lines=7) @@
396
        } else {
397
            $node = $this->root;
398
            while($node !== null) {
399
                if($key < $node->key) {
400
                    $node = $node->left;
401
                } else if($key > $node->key) {
402
                    $node = $node->right;
403
                } else {
404
                    return $node;
405
                }
406
            }
407
        }
408