public function set($key, $value)
    {
        if ($this->has($key)) {
            $old = $this->storage[$key];

            $this->storage[$key] = $value;

            return $old;
        }

        $this->storage[$key] = $value;

        return null;
    }
public function set($key, $value)
    {
        if ($this->has($key)) {
            $old = $this->storage[$key];

            $this->storage[$key] = $value;

            return $old;
        }

        $this->storage[$key] = $value;

        return null;
    }
public function set ( $ key , $ value ) { if ( $ this -> has ( $ key ) ) { $ old = $ this -> storage [ $ key ] ; $ this -> storage [ $ key ] = $ value ; return $ old ; } $ this -> storage [ $ key ] = $ value ; return null ; }
Modify an entry in the collection or the addition if not

@param string $key
@param mixed  $value

@return mixed
Modify an entry in the collection or the addition if not