code: public function offsetSet($key, $value)
      {
          if(!($value instanceof ItemInterface)) {
              $value = new Item($value);
          }
          parent::offsetSet($key, $value);
      }
docs: Set the item at a given offset.
  
  @param  mixed  $key
  @param  mixed  $value
  @return void