original_string: public function add($name, ItemInterface $item)
      {
          if (isset($this->relationships[$name]) === false) {
              $this->relationships[$name] = [];
          }
  
          unset($this->relationships[$name][$item->getId()]);
  
          $this->relationships[$name][$item->getId()] = $item;
      }
code: public function add($name, ItemInterface $item)
      {
          if (isset($this->relationships[$name]) === false) {
              $this->relationships[$name] = [];
          }
  
          unset($this->relationships[$name][$item->getId()]);
  
          $this->relationships[$name][$item->getId()] = $item;
      }
code_tokens: public function add ( $ name , ItemInterface $ item ) { if ( isset ( $ this -> relationships [ $ name ] ) === false ) { $ this -> relationships [ $ name ] = [ ] ; } unset ( $ this -> relationships [ $ name ] [ $ item -> getId ( ) ] ) ; $ this -> relationships [ $ name ] [ $ item -> getId ( ) ] = $ item ; }
docstring: Adds a relationship.
  
  @param string                                         $name The relationship name
  @param Yosymfony\Spress\Core\DataSource\ItemInterface $item An item
docstring_tokens: Adds a relationship .