original_string: public function addLayout(ItemInterface $item)
      {
          if ($this->hasLayout($item->getId()) === true) {
              throw new \RuntimeException(sprintf('A previous layout item exists with the same id: "%s".', $item->getId()));
          }
  
          $this->layouts[$item->getId()] = $item;
      }
code: public function addLayout(ItemInterface $item)
      {
          if ($this->hasLayout($item->getId()) === true) {
              throw new \RuntimeException(sprintf('A previous layout item exists with the same id: "%s".', $item->getId()));
          }
  
          $this->layouts[$item->getId()] = $item;
      }
code_tokens: public function addLayout ( ItemInterface $ item ) { if ( $ this -> hasLayout ( $ item -> getId ( ) ) === true ) { throw new \ RuntimeException ( sprintf ( 'A previous layout item exists with the same id: "%s".' , $ item -> getId ( ) ) ) ; } $ this -> layouts [ $ item -> getId ( ) ] = $ item ; }
docstring: Adds a new layout item.
  
  @param Yosymfony\Spress\Core\DataSource\ItemInterface $item
  
  @throws RuntimeException If a previous layout item exists with the same id
docstring_tokens: Adds a new layout item .