public function add($value): bool
    {
        if (isset($this->hashMap[$value])) {
            return false;
        }

        $this->hashMap[$value] = 1;

        return true;
    }
public function add($value): bool
    {
        if (isset($this->hashMap[$value])) {
            return false;
        }

        $this->hashMap[$value] = 1;

        return true;
    }
public function add ( $ value ) : bool { if ( isset ( $ this -> hashMap [ $ value ] ) ) { return false ; } $ this -> hashMap [ $ value ] = 1 ; return true ; }
Add the given value to the set if it is not already present.

@param mixed $value The value to be added.

@return bool True if the value was not present in the set, false otherwise.
Add the given value to the set if it is not already present .