public function update($key, $data, $overide = false)
    {
        if (!$this->has($key)) {
            return false;
        }

        if (!is_array($this->storage[$key]) || $overide === true) {
            $this->storage[$key] = $data;

            return true;
        }

        if (!is_array($data)) {
            $data = [$data];
        }

        $this->storage[$key] = array_merge($this->storage[$key], $data);

        return true;
    }
public function update($key, $data, $overide = false)
    {
        if (!$this->has($key)) {
            return false;
        }

        if (!is_array($this->storage[$key]) || $overide === true) {
            $this->storage[$key] = $data;

            return true;
        }

        if (!is_array($data)) {
            $data = [$data];
        }

        $this->storage[$key] = array_merge($this->storage[$key], $data);

        return true;
    }
public function update ( $ key , $ data , $ overide = false ) { if ( ! $ this -> has ( $ key ) ) { return false ; } if ( ! is_array ( $ this -> storage [ $ key ] ) || $ overide === true ) { $ this -> storage [ $ key ] = $ data ; return true ; } if ( ! is_array ( $ data ) ) { $ data = [ $ data ] ; } $ this -> storage [ $ key ] = array_merge ( $ this -> storage [ $ key ] , $ data ) ; return true ; }
Update an existing value in the collection

@param  string|integer $key
@param  mixed          $data
@param  boolean        $overide

@return boolean
Update an existing value in the collection