src/Common/Abstracts/AbstractLinkedList.php
public function containsValue($value): bool {
        $node = $this->getHead();
        while ($node !== null) {
            if (Comparator::equals($node->getValue(), $value)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
public function containsValue($value): bool {
        $node = $this->getHead();
        while ($node !== null) {
            if (Comparator::equals($node->getValue(), $value)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
public function containsValue ( $ value ) : bool { $ node = $ this -> getHead ( ) ; while ( $ node !== null ) { if ( Comparator :: equals ( $ node -> getValue ( ) , $ value ) ) { return true ; } $ node = $ node -> getNext ( ) ; } return false ; }
searches the list for a given value

@param $value
@return bool
searches the list for a given value