code: public function offsetSet( $item, $node )
      {
          // We only allow to append nodes to node list, so that we bail out on
          // all other array keys then null.
          if ( $item !== null )
          {
              throw new ValueException( $item, 'null' );
          }
  
          return $this->nodes[] = $node;
      }
docs: Append node to node list
  
  Append node to node list
  
  @param int $item
  @param Node $node
  @return void