src/Datastructure/Maps/HashMap.php
public function containsValue($value): bool {

        /**
         * @var string $arrayIndex
         * @var SinglyLinkedList $list
         */
        foreach ($this->bucket as $arrayIndex => $list) {
            /* $list is the first element in the bucket. The bucket
             * can contain max $maxSize entries and each entry has zero
             * or one nodes which can have zero, one or multiple
             * successors.
             */
            if ($list->containsValue($value)) {
                return true;
            }
        }
        /*
         * If no bucket contains the value then return false because
         * the searched value is not in the list.
         */
        return false;
    }
public function containsValue($value): bool {

        /**
         * @var string $arrayIndex
         * @var SinglyLinkedList $list
         */
        foreach ($this->bucket as $arrayIndex => $list) {
            /* $list is the first element in the bucket. The bucket
             * can contain max $maxSize entries and each entry has zero
             * or one nodes which can have zero, one or multiple
             * successors.
             */
            if ($list->containsValue($value)) {
                return true;
            }
        }
        /*
         * If no bucket contains the value then return false because
         * the searched value is not in the list.
         */
        return false;
    }
public function containsValue ( $ value ) : bool { /**
         * @var string $arrayIndex
         * @var SinglyLinkedList $list
         */ foreach ( $ this -> bucket as $ arrayIndex => $ list ) { /* $list is the first element in the bucket. The bucket
             * can contain max $maxSize entries and each entry has zero
             * or one nodes which can have zero, one or multiple
             * successors.
             */ if ( $ list -> containsValue ( $ value ) ) { return true ; } } /*
         * If no bucket contains the value then return false because
         * the searched value is not in the list.
         */ return false ; }
determines whether the HashMap contains a value.

@param $value
@return bool
determines whether the HashMap contains a value .