src/Datastructure/Graph/Tree/Heap/MinHeap.php
public function inHeap(int $element): bool {
        foreach ($this->heap as $key => $value) {
            if (Comparator::equals($element, $value)) {
                return true;
            }
        }
        return false;
    }
public function inHeap(int $element): bool {
        foreach ($this->heap as $key => $value) {
            if (Comparator::equals($element, $value)) {
                return true;
            }
        }
        return false;
    }
public function inHeap ( int $ element ) : bool { foreach ( $ this -> heap as $ key => $ value ) { if ( Comparator :: equals ( $ element , $ value ) ) { return true ; } } return false ; }
determines if a element is in the heap or not

@param int $element
@return bool
determines if a element is in the heap or not