public function node($id)
    {
        if (isset($this->items[$id])) {
            throw new \RuntimeException(sprintf('Duplicate item ID: "%s"', $id));
        }
        
        return $this->items[$id] = new Node($id);
    }
public function node($id)
    {
        if (isset($this->items[$id])) {
            throw new \RuntimeException(sprintf('Duplicate item ID: "%s"', $id));
        }
        
        return $this->items[$id] = new Node($id);
    }
public function node ( $ id ) { if ( isset ( $ this -> items [ $ id ] ) ) { throw new \ RuntimeException ( sprintf ( 'Duplicate item ID: "%s"' , $ id ) ) ; } return $ this -> items [ $ id ] = new Node ( $ id ) ; }
Add a new node to the process.

@param string $id Unique ID of the node.
@return Node Created node instance.
Add a new node to the process .